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
  Muied Lumens Frequencies
Please visit the chat
 Forum index » DIY Hardware and Software » ChucK programming language
Send Events to chuck in C++
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [1 Post]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
klaustrian



Joined: Mar 13, 2016
Posts: 1
Location: vienna

PostPosted: Sun Mar 13, 2016 12:09 pm    Post subject: Send Events to chuck in C++
Subject description: How can I trigger notes from outside the chuck instance?
Reply with quote  Mark this post and the followings unread

How would I implement triggering notes or sending events to a running chuck process in xcode?

Example:
In my C++ project I setup a shred like this…

Code:
  libchuck_add_shred(ck, "", SCRIPT);

where SCRIPT is something like:
Code:

fun void play(int note){
    SinOsc s => dac;   
    s.freq(Std.mtof(note));
    1000::ms=>now;
    s !=> dac; // I assume, this frees memory?
}

while(true){
    // how can I receive events from my c++ part here?
    // ... => note
   
    spork ~ play(note);
}


And now from my C++ code I want to trigger notes or send events to the running shred:

Code:
  triggerChuckSomehow(note, velocity){

   //  send event to chuck
  }

Can this be done?
I know, there is osc, but that´s kind of a weird overhead I think.

Thanks,
Klaus
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 [1 Post]
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