electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
Live streaming at radio.electro-music.com

  host / artist show at your time
  mosc Back on the air tonight - Twyndyllyngs
Please visit the chat
 Forum index » DIY Hardware and Software » ChucK programming language
MIDI control of sample parameters question.
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [3 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
sir honey



Joined: Aug 04, 2006
Posts: 36
Location: NY

PostPosted: Sat Feb 24, 2007 2:29 pm    Post subject: MIDI control of sample parameters question. Reply with quote  Mark this post and the followings unread

hey again,

I'm trying to do some basic MIDI implementation, and having a bit of a time doing it. here's my code.

Code:


// here we go MIDI implementation
//jack ryon 2007

SndBuf samp1 => Echo echo1 => dac;
"/andyloops/dnb/DNO78B~1.WAV" => samp1.read;
10::second => echo1.max;

MidiIn min;
MidiMsg msg;
min.open(2) => int minopen;
if(!minopen) me.exit();

while(true)
{
   min => now;
   while(min.recv(msg))
   {
      //<<<msg.data1,msg.data2,msg.data3,"here's MIDI!">>>;
      if(msg.data2() == 74)
      {
         ((msg.data3())/127) * samp1.samples() => samp1.pos;
      }
   }
}


what I'm trying to do is use controller 74 to change location of start point in my sample and effectively, "scrub," through the file.

I can't compile this code, and receive a "function call using non-function variable" message in command line. What does this mean, and what can I do to get rid of it? Thanks for the help, guys.

jack Wink
Back to top
View user's profile Send private message
moudi



Joined: Oct 07, 2006
Posts: 63
Location: Bern Switzerland

PostPosted: Sat Feb 24, 2007 2:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

hi sir honey

i think your problem is this part:
Code:
msg.data2()

msg.data2 is not a function, so you don't need the brackets for reading the value.
(as you did it a line above).

jassas
/moudi
Back to top
View user's profile Send private message Visit poster's website
sir honey



Joined: Aug 04, 2006
Posts: 36
Location: NY

PostPosted: Sat Feb 24, 2007 3:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

hi moudi,

thanks, that does help me get going in the right direction.

I'm working on your comp/limiter question, but haven't got my code running properly yet. I'll let you know...

jack
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [3 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use