[Csnd] Dynamically/Actively Panning Midi Notes
Date | 2013-06-28 18:25 |
From | jkeary |
Subject | [Csnd] Dynamically/Actively Panning Midi Notes |
Hi there, I am using csound for my job and have come across something that has stumped me greatly. In a nutshell I need to pan an output midi file dynamically, i.e. drag the notes across the stereo field from left to right over the duration of the file. My .csd file outputs a midi file, not an audio file, not real time, just a .mid file: which I then load into a daw or notation software such as sibelius, logic, or finale. This seems to not be the intended use for csound, regardless its what I am attempting to do for my job. The midi notes in the file can be long, and are in actuality tied note statements such as this: inst st dur pch i1 0 -2 440 i1 1 1 440 This would be very easy to pan over the course of file if I just added pan p statements throughout, like so: inst st dur pch pan i1 0 -2 440 0 i1 1 1 440 1 which would pan the note (440 Hz) from left (0) to right (1) over the course of 2 beats. HOWEVER, it seems that the negative convention of tying notes in csound (as laid out in the csound book and this article: http://www.csounds.com/journal/2005fall/tiedNotes.html) does not translate into the midi protocol, and thus these notation programs / daws don't know what to do with a negative note. So, I then created a matlab script to tie notes together into a single note statement, in which something like this inst st dur pch pan i1 0 -2 440 0 i1 1 1 440 1 would become this inst st dur pch pan i1 0 2 440 ??? So how do I pan that, dynamically from left to right? I thought of mono-ing the whole file and creating a mixer instrument that would pan across the entire file, something like as described here: http://www.csounds.com/journal/issue13/emulatingMidiBasedStudios.html. However DYNAMIC panning doesn't seem possible with this. Does anyone have any thoughts on this? Is it possible? What about panning note statements using ftables as you would do with regular cosund instruments? How would you do that with midi instruments? Heres some code: |
Date | 2013-06-28 19:35 |
From | Andres Cabrera |
Subject | Re: [Csnd] Dynamically/Actively Panning Midi Notes |
Hi, Panning in MIDI is a control message, generally control #10, so you could send a control output on the MIDI channel you need from 0 to 127 in the duration that you need. You could use int and changed to avoid sending more messages than you need. Cheers, Andrés On Fri, Jun 28, 2013 at 10:25 AM, jkeary <jkeary@gmail.com> wrote: Hi there, |
Date | 2013-07-01 06:32 |
From | jkeary |
Subject | [Csnd] Re: Dynamically/Actively Panning Midi Notes |
Hi Andreas, Thanks for the quick reply, but I still not sure I understand. Would I use the ctrl7 opcode to pan it dynamically? Perhaps an example would help. Thanks again. James ----- jaemskeray -- View this message in context: http://csound.1045644.n5.nabble.com/Dynamically-Actively-Panning-Midi-Notes-tp5724944p5725029.html Sent from the Csound - General mailing list archive at Nabble.com. |