Csound Csound-dev Csound-tekno Search About

[Csnd] Detecting whether input note is using cSoundInputMessage or MIDI input

Date2013-09-05 03:50
Fromlppier
Subject[Csnd] Detecting whether input note is using cSoundInputMessage or MIDI input
Hi, 

I'm using the following csound command in my app. (csound ios 5.19)

midinoteonkey p4, p5

Is there any way to determine (within the csound csd) if I am using an
actual midi keyboard to input the notes and using a command like the
following : 
        csoundInputMessage(mCsData.cs, [score
cStringUsingEncoding:NSASCIIStringEncoding]);

On a side note, is there a built in note transpose command in cSound
already? Other than doing manually addition to the input note. 

Thank you. 

Pier. 



--
View this message in context: http://csound.1045644.n5.nabble.com/Detecting-whether-input-note-is-using-cSoundInputMessage-or-MIDI-input-tp5727386.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2013-09-05 04:52
Fromlppier
Subject[Csnd] Re: Detecting whether input note is using cSoundInputMessage or MIDI input
Alright I realised I could transpose easily by just adding to p4 - duh! 
So according to this table
http://www.electronics.dit.ie/staff/tscarff/Music_technology/midi/midi_note_numbers_for_octaves.htm 
I can transpose an octave by adding 12 to p4 in this way, correct? 

p4 = p4 + 12



--
View this message in context: http://csound.1045644.n5.nabble.com/Detecting-whether-input-note-is-using-cSoundInputMessage-or-MIDI-input-tp5727386p5727387.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2013-09-06 11:18
FromSteven Yi
SubjectRe: [Csnd] Re: Detecting whether input note is using
Hi Pier,

I don't recall any way to inspect if a note is started by MIDI or not.
You might be able to use mididefault to create your own detection
system, say, by setting p6 to 1 with mididefault, but always using 0
when using csoundInputMessage.

As for octave transposition, adding 12 in midi steps is correct,
assuming you're then going to convert to a frequency value.  You could
also always convert to frequency, then multiply by 2 to get the next
octave up.

steven

On Thu, Sep 5, 2013 at 4:52 AM, lppier  wrote:
> Alright I realised I could transpose easily by just adding to p4 - duh!
> So according to this table
> http://www.electronics.dit.ie/staff/tscarff/Music_technology/midi/midi_note_numbers_for_octaves.htm
> I can transpose an octave by adding 12 to p4 in this way, correct?
>
> p4 = p4 + 12
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Detecting-whether-input-note-is-using-cSoundInputMessage-or-MIDI-input-tp5727386p5727387.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to the Sourceforge bug trackers
> csound6:
>             https://sourceforge.net/p/csound/tickets/
> csound5:
>             https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>

Date2013-09-06 14:16
Fromlppier
Subject[Csnd] Re: Detecting whether input note is using
Thanks Steven , will give it a try!

Sent from my iPhone

On 6 Sep, 2013, at 6:18 pm, "Steven Yi [via Csound]" <[hidden email]> wrote:

Hi Pier,

I don't recall any way to inspect if a note is started by MIDI or not.
You might be able to use mididefault to create your own detection
system, say, by setting p6 to 1 with mididefault, but always using 0
when using csoundInputMessage.

As for octave transposition, adding 12 in midi steps is correct,
assuming you're then going to convert to a frequency value.  You could
also always convert to frequency, then multiply by 2 to get the next
octave up.

steven

On Thu, Sep 5, 2013 at 4:52 AM, lppier <[hidden email]> wrote:

> Alright I realised I could transpose easily by just adding to p4 - duh!
> So according to this table
> http://www.electronics.dit.ie/staff/tscarff/Music_technology/midi/midi_note_numbers_for_octaves.htm
> I can transpose an octave by adding 12 to p4 in this way, correct?
>
> p4 = p4 + 12
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Detecting-whether-input-note-is-using-cSoundInputMessage-or-MIDI-input-tp5727386p5727387.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to the Sourceforge bug trackers
> csound6:
>             https://sourceforge.net/p/csound/tickets/
> csound5:
>             https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email [hidden email] with body "unsubscribe csound"
>
>

Send bugs reports to the Sourceforge bug trackers
csound6:
            https://sourceforge.net/p/csound/tickets/
csound5:
            https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email [hidden email] with body "unsubscribe csound"





To unsubscribe from Detecting whether input note is using cSoundInputMessage or MIDI input, click here.
NAML


View this message in context: Re: Detecting whether input note is using
Sent from the Csound - General mailing list archive at Nabble.com.