Csound Csound-dev Csound-tekno Search About

[Csnd] midi and score

Date2008-12-02 15:17
Frommenno
Subject[Csnd] midi and score
Hello,

i'm attacking the midi section of Csound now and have a question about it.
I want to be able to play an instrument by its score but also at the same
time by midi - and later find a way to store the midimovements. I'm using
the midi/score interoperatbility opcodes. 
First question: can i play a score and midi on the same instrument at the
same time?

In the file below i can either play midi or use the score note by commenting
out (or not): kcps	=	p4
but can not use them both.


; Generated by blue 0.125.0 (http://csounds.com/stevenyi/blue/index.html)
;




sr=44100
ksmps=1
nchnls=2

; Initialize the global variables.
; Instrument #1.


	opcode declick,a,a


ain     xin
aenv    linseg 0, 0.1, 1, p3 - 0.05, 1, 0.02, 0, 0.01, 0
        xout ain * aenv         ; apply envelope and write output



	endop


	instr 1	;midinoteoncps
  kcps init 0
  kvelocity init 0
  midinoteoncps kcps, kvelocity
kcps	=	p4
kamp	=	kvelocity*200
  ; Display the cycles-per-second value when it changes.
  printk2 kvelocity

aout	oscil kamp, kcps, 1
aout	declick	aout
outs	aout, aout
	endin






f 1 0 16384 10 1

i1	0.0	10	440

e





Menno

-----
http://www.jamendo.com/de/album/6789/
http://www.jamendo.com/en/album/7428/
-- 
View this message in context: http://www.nabble.com/midi-and-score-tp20794179p20794179.html
Sent from the Csound - General mailing list archive at Nabble.com.


Date2008-12-02 17:03
From"Michael Gogins"
Subject[Csnd] Re: midi and score
AttachmentsNone  

Date2008-12-02 20:24
Frommenno
Subject[Csnd] Re: midi and score
I'm using Suse 11.0 and it seems the packager that packaged Csound did not
include CsoundAC. I will sent him a message and ask him if he'd be willing
to do that next time.
But I found a good starting point for use of the midi keyboard and the score
playing at the same time in your tutorial.pdf that luckily is a package to
install via Yast.
Now in blue i can create 2 Objects, one that will play the score notes of
the instrument and parallel a kind of dummy Object that has a long note with
zero velocty. The dummy can be used for realtime playing via midi.
Do you perhaps have an idea about an opcode that would "capture" the notes
being played via Midi and put it in a table?

thanks Mike for your help so far,
Menno


-----
http://www.jamendo.com/de/album/6789/
http://www.jamendo.com/en/album/7428/
-- 
View this message in context: http://www.nabble.com/midi-and-score-tp20794179p20800154.html
Sent from the Csound - General mailing list archive at Nabble.com.