[Csnd] construct a midi file player with csound
Date | 2012-03-10 09:01 |
From | Gmail |
Subject | [Csnd] construct a midi file player with csound |
Hi list, i want to make a midi file player with csound but i can't figure exactly how to start. i've use in past midi triggered instrument and orchestra but now, i just want one of my instrument will be a player and output the midi file on a midi port. I want to do that because i want to start midi file with a complete file loop activated (file always looping) and when i open a new midi file, i want this new midi file start on the beat. (may be using a clock from the precedent midi file or something like that?....) thank you S.Boussuge |
Date | 2012-03-10 10:04 |
From | joachim heintz |
Subject | Re: [Csnd] construct a midi file player with csound |
hi - i never did this, but did you have a look at iain's chapter in the csound floss manual? http://en.flossmanuals.net/csound/ch048_d-reading-midi-files/ joachim Am 10.03.2012 10:01, schrieb Gmail: > > Hi list, > > i want to make a midi file player with csound but i can't figure exactly how to start. > i've use in past midi triggered instrument and orchestra but now, i just want one of my instrument will be a player and output the midi file on a midi port. > > I want to do that because i want to start midi file with a complete file loop activated (file always looping) and when i open a new midi file, i want this new midi file start on the beat. (may be using a clock from the precedent midi file or something like that?....) > > > thank you > > S.Boussuge > > > > 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" > > |
Date | 2012-03-11 00:03 |
From | Victor Lazzarini |
Subject | Re: [Csnd] construct a midi file player with csound |
Here's a simple example: |
Date | 2012-03-12 08:14 |
From | Gmail |
Subject | Re: [Csnd] construct a midi file player with csound |
Thanks, i'll explore this way. But i want to open a midi file with my Csound player like with another executable i.e. : something like in osX terminal: open mycsoundapp mymidifile.mid. but i feel i'll can't do that until we can make Csound executable with cabbage or other ..... thanks for your help s.b Le 11 mars 2012 à 01:03, Victor Lazzarini a écrit : > Here's a simple example: > > |
Date | 2012-03-12 09:59 |
From | Victor Lazzarini |
Subject | Re: [Csnd] construct a midi file player with csound |
Not sure I understand exactly what you'd like to do. Would you like to write something to playback a MIDI file with Csound as a sound generator or to write a MIDI file that Csound has generated? Both are possible, and you can combine them as well. Victor On 12 Mar 2012, at 08:14, Gmail wrote: > Thanks, i'll explore this way. > But i want to open a midi file with my Csound player like with another executable i.e. : something like in osX terminal: open mycsoundapp mymidifile.mid. > but i feel i'll can't do that until we can make Csound executable with cabbage or other ..... > > thanks for your help > > s.b > > > Le 11 mars 2012 à 01:03, Victor Lazzarini a écrit : > >> Here's a simple example: >> >> |
Date | 2012-03-12 10:06 |
From | Gmail |
Subject | Re: [Csnd] construct a midi file player with csound |
I want to make a midi file player, a piece of code who can open a midi file and play this midi file (with loop capability, rewind, forward ...) on a midi output of my choice. thanks Stephane Le 12 mars 2012 à 10:59, Victor Lazzarini a écrit : > Not sure I understand exactly what you'd like to do. Would you like to write something to playback a MIDI file with Csound as a sound generator or to write a MIDI file that Csound has generated? > Both are possible, and you can combine them as well. > > Victor > > On 12 Mar 2012, at 08:14, Gmail wrote: > >> Thanks, i'll explore this way. >> But i want to open a midi file with my Csound player like with another executable i.e. : something like in osX terminal: open mycsoundapp mymidifile.mid. >> but i feel i'll can't do that until we can make Csound executable with cabbage or other ..... >> >> thanks for your help >> >> s.b >> >> >> Le 11 mars 2012 à 01:03, Victor Lazzarini a écrit : >> >>> Here's a simple example: >>> >>> |
Date | 2012-03-12 10:08 |
From | Rory Walsh |
Subject | Re: [Csnd] construct a midi file player with csound |
I recall a member of the list writing a fully fledged midi player for the OLPC project. Victor perhaps? On 12 March 2012 02:59, Victor Lazzarini |
Date | 2012-03-12 11:11 |
From | Tito Latini |
Subject | Re: [Csnd] construct a midi file player with csound |
Attachments | None |
Date | 2012-03-12 11:33 |
From | zappfinger |
Subject | [Csnd] Re: construct a midi file player with csound |
Yes, but this way the midi filename is 'hard-coded' in the csd file. To make it flexible you could use a higher programming language like Python. Replace the line: f1 0 0 -1 "fanfare.mid" 0 1 1 with f1 0 0 -1 "%s" 0 1 1 read the .csd file into a list, loop through it and use something like if '%s' in line: line = line % midifilename save the list to a .csd file and play it. Richard -- View this message in context: http://csound.1045644.n5.nabble.com/construct-a-midi-file-player-with-csound-tp5552567p5557427.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2012-03-12 11:41 |
From | Steven Yi |
Subject | Re: [Csnd] Re: construct a midi file player with csound |
There's also the ability to define the values of orchestra and score macro's from the commandline: --omacro:XXX=YYY Set orchestra macro XXX to value YYY --smacro:XXX=YYY Set score macro XXX to value YYY I remember Matt Ingalls demonstrating making utilities with MacCsound many years ago and I think it was using this functionality. So the MIDI file could be specified with a macro like $MIDIFILE and csound could be called with --smacro:MIDIFILE=fanfare.mid. steven On Mon, Mar 12, 2012 at 11:33 AM, zappfinger |
Date | 2012-03-12 11:44 |
From | Tito Latini |
Subject | Re: [Csnd] Re: construct a midi file player with csound |
Attachments | None |
Date | 2012-03-12 11:51 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Re: construct a midi file player with csound |
Not sure Tito is completely serious in his proposal ;) On 12 Mar 2012, at 11:33, zappfinger wrote: > Yes, but this way the midi filename is 'hard-coded' in the csd file. > To make it flexible you could use a higher programming language like Python. > > Replace the line: > > f1 0 0 -1 "fanfare.mid" 0 1 1 > > with > > f1 0 0 -1 "%s" 0 1 1 > > read the .csd file into a list, loop through it and use something like > > if '%s' in line: > line = line % midifilename > > save the list to a .csd file and play it. > > Richard > > > -- > View this message in context: http://csound.1045644.n5.nabble.com/construct-a-midi-file-player-with-csound-tp5552567p5557427.html > Sent from the Csound - General mailing list archive at Nabble.com. > > > 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 |
Date | 2012-03-12 11:59 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Re: construct a midi file player with csound |
But actually, it's a great idea: to have somewhere where we can place MIDI files which we could navigate at will. On 12 Mar 2012, at 11:44, Tito Latini wrote: > Richard and Steven, it was only a joke! > > > 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 |
Date | 2012-03-12 12:06 |
From | Iain McCurdy |
Subject | RE: [Csnd] Re: construct a midi file player with csound |
Would something like a 'diskin' for midi files be useful, something that would read them from a function table? Output could be mixed into Csound's realtime midi input (or output) so that score fragments could be stored as midi files and triggered and mixed at will all within Csound. I. > From: Victor.Lazzarini@nuim.ie > Date: Mon, 12 Mar 2012 11:59:52 +0000 > To: csound@lists.bath.ac.uk > Subject: Re: [Csnd] Re: construct a midi file player with csound > > But actually, it's a great idea: to have somewhere where we can place MIDI files which we could navigate at will. > > On 12 Mar 2012, at 11:44, Tito Latini wrote: > > > Richard and Steven, it was only a joke! > > > > > > 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 > > > > > > 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" > |
Date | 2012-03-12 12:06 |
From | Tito Latini |
Subject | Re: [Csnd] Re: construct a midi file player with csound |
Attachments | None |
Date | 2012-03-12 12:45 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Re: construct a midi file player with csound |
It starts like that. We play the raw bytes directly, then we do it properly. Then we go back to the raw bytes as they sounded more interesting. Victor On 12 Mar 2012, at 12:06, Tito Latini wrote: >> But actually, it's a great idea: to have somewhere where we can place MIDI files which we could navigate at will. > > Yeah, that was a subliminal message > > > 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 |