Csound Csound-dev Csound-tekno Search About

Re: MIDI & csound

Date2006-01-09 01:22
From"Michael Gogins"
SubjectRe: MIDI & csound
MIDI notes have an indefinite length, until they are turned on.

The midinoteon* opcodes are "midi interoperation" opcodes designed to enable 
one to write instruments that work the same way with MIDI or with Csound 
scores. In a MIDI performance, p3 has a default length of 20 seconds and 
then will turn off, or, it will turn off when a NOTE OFF event comes in the 
MIDI port. In a score performance, it simply has the length of the regular 
p3.

Regards,
Mike

----- Original Message ----- 
From: "S. Massy" 
To: 
Sent: Sunday, January 08, 2006 7:28 PM
Subject: [Csnd] MIDI & csound


> Hi,
>
> Thanks to everyone who helped me get real-time midi going with alsa.
>
> My next question has to do with interfacing midi with csound
> instruments. Looking at the definition for the midinoteon opcode in the
> csound manual, it looks pretty simple; however, when I tried the
> following simple example, all I got was a terrible noise:
> ORC:
> instr 1
>    mididefault 20, p3
>    midinoteoncps p5, p4
>
>    kamp linenr 8000, p3/3, p3, p3/3
>    asig oscil kamp+1000, p5, 1
>    out asig
> endin
> SCO:
> f1 0 4096 10 1
> i1 0 10
>
> And I am playing it with a command line such as
> $ csound -f majorscale.mid midiexp.orc midiexp.sco
>
> Question: How does one obtain the length of a note when using midi?
>
> I'd be really grateful if anyone could provide or point me to a simple,
> working example of a midi-driven instrument. Ultimately, I would like to
> be able to design instruments with csound, but write songs using a
> simple text-to-midi language (midge), possibly mixing and matching it
> with some csound-style scoring for effects and the like.
>
> Thanks,
> S.M.
> -- 
> smassy@sdf.lonestar.org
> -- 
> Send bugs reports to this list.
> To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk
>