Csound Csound-dev Csound-tekno Search About

[Csnd] Trigger an Envelope from Max without MIDI

Date2012-04-13 18:56
Fromandreas russo
Subject[Csnd] Trigger an Envelope from Max without MIDI
Hello list,

I am working on a Max patch that uses csound~ as the synth engine.
I would like to send values of 1 from Max to start an envelope's attack and decay phase and values of 0 to start the release phase.
I have looked through all the envelopes, but I don't seem to find any of them that might work with a trigger that is not MIDI.
any suggestions?
also, if the instrument is polyphonic, would there be a way to make the trigger act independently on each note, rather than being applied to the amplitude of the whole instrument?

hope this is clear.
I'd really appreciate your help.

Andreas

Date2012-04-13 19:02
FromVictor Lazzarini
SubjectRe: [Csnd] Trigger an Envelope from Max without MIDI
It's possible, you could try to use on instrument to control another, with "event" / "turnoff2"

Victor
On 13 Apr 2012, at 18:56, andreas russo wrote:

> Hello list,
> 
> I am working on a Max patch that uses csound~ as the synth engine.
> I would like to send values of 1 from Max to start an envelope's attack and decay phase and values of 0 to start the release phase.
> I have looked through all the envelopes, but I don't seem to find any of them that might work with a trigger that is not MIDI.
> any suggestions?
> also, if the instrument is polyphonic, would there be a way to make the trigger act independently on each note, rather than being applied to the amplitude of the whole instrument?
> 
> hope this is clear.
> I'd really appreciate your help.
> 
> Andreas
> 
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





Date2012-04-13 19:05
FromJohn Clements
SubjectRe: [Csnd] Trigger an Envelope from Max without MIDI
You could send csound~ event messages (beginning with e) that will be your 'notes' and use an envelope like envlpx, sending in these score events the 'trigger' and time values for your envelope.

May not be exactly what you are trying to accomplish, but...

Hope this helps

John Clements


On Apr 13, 2012, at 1:56 PM, andreas russo  wrote:

> Hello list,
> 
> I am working on a Max patch that uses csound~ as the synth engine.
> I would like to send values of 1 from Max to start an envelope's attack and decay phase and values of 0 to start the release phase.
> I have looked through all the envelopes, but I don't seem to find any of them that might work with a trigger that is not MIDI.
> any suggestions?
> also, if the instrument is polyphonic, would there be a way to make the trigger act independently on each note, rather than being applied to the amplitude of the whole instrument?
> 
> hope this is clear.
> I'd really appreciate your help.
> 
> Andreas
> 
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 


Date2012-04-13 19:05
FromSteven Yi
SubjectRe: [Csnd] Trigger an Envelope from Max without MIDI
Hi Andreas,

One possibility that comes to mind is to use held notes (negative p3)
and code the instrument using one of the envelopes with release
segments (i.e. transegr, linsegr, expegr).  These envelopes will
generate up until the sustain and hold on that, then when the note is
turned of, the release time is processed separately from the note
duration.

As for individual attacks per note, you can do that by using extra
pfields.  It may pay off then to pass a note event into csound~
instead of passing a k-rate value.  So, instead of 1/0, using score
events like "i 1.1 0 -1 3 4 5" and "i 1.1 0 1 3 4 5". Doing this,
you'll have to use the skip init flags in opcodes and perhaps use
fractional notes to track individual instances of note to turn on/off.

On Fri, Apr 13, 2012 at 10:56 AM, andreas russo  wrote:
> Hello list,
>
> I am working on a Max patch that uses csound~ as the synth engine.
> I would like to send values of 1 from Max to start an envelope's attack and decay phase and values of 0 to start the release phase.
> I have looked through all the envelopes, but I don't seem to find any of them that might work with a trigger that is not MIDI.
> any suggestions?
> also, if the instrument is polyphonic, would there be a way to make the trigger act independently on each note, rather than being applied to the amplitude of the whole instrument?
>
> hope this is clear.
> I'd really appreciate your help.
>
> Andreas
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>


Date2012-04-19 22:50
Fromandreas russo
SubjectRe: [Csnd] Trigger an Envelope from Max without MIDI
they all seem like very valuable possibilities.
I'll try them all and see what fits better.
thanks you all!

andreas

On Apr 13, 2012, at 14:05, John Clements wrote:

> You could send csound~ event messages (beginning with e) that will be your 'notes' and use an envelope like envlpx, sending in these score events the 'trigger' and time values for your envelope.
> 
> May not be exactly what you are trying to accomplish, but...
> 
> Hope this helps
> 
> John Clements
> 
> 
> On Apr 13, 2012, at 1:56 PM, andreas russo  wrote:
> 
>> Hello list,
>> 
>> I am working on a Max patch that uses csound~ as the synth engine.
>> I would like to send values of 1 from Max to start an envelope's attack and decay phase and values of 0 to start the release phase.
>> I have looked through all the envelopes, but I don't seem to find any of them that might work with a trigger that is not MIDI.
>> any suggestions?
>> also, if the instrument is polyphonic, would there be a way to make the trigger act independently on each note, rather than being applied to the amplitude of the whole instrument?
>> 
>> hope this is clear.
>> I'd really appreciate your help.
>> 
>> Andreas
>> 
>> Send bugs reports to the Sourceforge bug tracker
>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>> 
> 
> 
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 



Date2012-04-20 03:44
Fromandreas russo
Subject[Csnd] "polyphonic" pitch-bend
hello list,

I am building an iPad conrtolled, Max patch that using Csound as a synthesizer.
I am triggering MIDI notes by touching different spots of the iPad screen, and I would like to have "independent pitch bend", as in, by sliding the finger associated with the note, only that note glides. each note is independently controlled by its finger, rather than by a generig pitch bend.
do you have any idea on how to communicate that to Csound?
as in, what opcode, if any, would allow me to send "poly" pitch-bend messages?

I always apprechiate your help, or even just reading the list. such a source of inspiration.

Andreas

Date2012-04-20 14:39
FromTarmo Johannes
SubjectRe: [Csnd] "polyphonic" pitch-bend
hello,

I think pitchbend is valid for all notes in specified midi channel,.If you 
don't have too many notes playing or you can map them areound in some clever 
way so that you reserve some channels for notes that you want to bend and send 
there nothing else in the same time.

or otherwise you should read the pitch bend amount with pchbend opcode and 
apply it to your audio signal for example with pvscale (see  
http://csound.1045644.n5.nabble.com/Pitch-shift-td1119743.html )

so you are out of  the restricted midi area to the unlimited ocean of csound 
:)

if it helps...

tarmo

On Thursday 19 April 2012 22:44:59 andreas russo wrote:
> hello list,
> 
> I am building an iPad conrtolled, Max patch that using Csound as a
> synthesizer. I am triggering MIDI notes by touching different spots of the
> iPad screen, and I would like to have "independent pitch bend", as in, by
> sliding the finger associated with the note, only that note glides. each
> note is independently controlled by its finger, rather than by a generig
> pitch bend. do you have any idea on how to communicate that to Csound?
> as in, what opcode, if any, would allow me to send "poly" pitch-bend
> messages?
> 
> I always apprechiate your help, or even just reading the list. such a source
> of inspiration.
> 
> Andreas
> 
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"

Date2012-04-20 15:03
FromSteven Yi
SubjectRe: [Csnd] "polyphonic" pitch-bend
The multitouchXY example in the iOS and Android SDK's do essentially
this, where each note has it's own pitch controlled by finger.
Essentially, the control signals from the fingers mapped to channels,
each with it's own id, something like "pitch.1", "pitch.2", "amp.1",
"amp.2".  Each note that got start had an ID associated with it, and
the code inside would use the ID to read from a specific channel.

You can find the code in either of the SDK's, or view online here for iOS:

http://csound.git.sourceforge.net/git/gitweb.cgi?p=csound/csound5.git;a=tree;f=iOS/Csound+iOS+Examples/Csound+iOS+Examples/ViewControllers/MultiTouchXY;h=e5de2b3746b69c5b3bdffd715932fb5068afe3cb;hb=HEAD

In the CSD, you'll find:

S_xName sprintf "touch.%d.x", i_instanceNum
S_yName sprintf "touch.%d.y", i_instanceNum

Good luck!
steven

On Fri, Apr 20, 2012 at 3:44 AM, andreas russo  wrote:
> hello list,
>
> I am building an iPad conrtolled, Max patch that using Csound as a synthesizer.
> I am triggering MIDI notes by touching different spots of the iPad screen, and I would like to have "independent pitch bend", as in, by sliding the finger associated with the note, only that note glides. each note is independently controlled by its finger, rather than by a generig pitch bend.
> do you have any idea on how to communicate that to Csound?
> as in, what opcode, if any, would allow me to send "poly" pitch-bend messages?
>
> I always apprechiate your help, or even just reading the list. such a source of inspiration.
>
> Andreas
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>


Date2012-04-20 15:37
Fromandreas russo
SubjectRe: [Csnd] "polyphonic" pitch-bend
thank you both!

andreas

On Apr 20, 2012, at 10:03, Steven Yi wrote:

> The multitouchXY example in the iOS and Android SDK's do essentially
> this, where each note has it's own pitch controlled by finger.
> Essentially, the control signals from the fingers mapped to channels,
> each with it's own id, something like "pitch.1", "pitch.2", "amp.1",
> "amp.2".  Each note that got start had an ID associated with it, and
> the code inside would use the ID to read from a specific channel.
> 
> You can find the code in either of the SDK's, or view online here for iOS:
> 
> http://csound.git.sourceforge.net/git/gitweb.cgi?p=csound/csound5.git;a=tree;f=iOS/Csound+iOS+Examples/Csound+iOS+Examples/ViewControllers/MultiTouchXY;h=e5de2b3746b69c5b3bdffd715932fb5068afe3cb;hb=HEAD
> 
> In the CSD, you'll find:
> 
> S_xName sprintf "touch.%d.x", i_instanceNum
> S_yName sprintf "touch.%d.y", i_instanceNum
> 
> Good luck!
> steven
> 
> On Fri, Apr 20, 2012 at 3:44 AM, andreas russo  wrote:
>> hello list,
>> 
>> I am building an iPad conrtolled, Max patch that using Csound as a synthesizer.
>> I am triggering MIDI notes by touching different spots of the iPad screen, and I would like to have "independent pitch bend", as in, by sliding the finger associated with the note, only that note glides. each note is independently controlled by its finger, rather than by a generig pitch bend.
>> do you have any idea on how to communicate that to Csound?
>> as in, what opcode, if any, would allow me to send "poly" pitch-bend messages?
>> 
>> I always apprechiate your help, or even just reading the list. such a source of inspiration.
>> 
>> Andreas
>> 
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>> 
> 
> 
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>