Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
Re: [sc-users] VoicerSusPedal question [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [sc-users] VoicerSusPedal question To: sc-users@xxxxxxxxxxxxxxxx Subject: Re: [sc-users] VoicerSusPedal question From: James Harkins Date: Thu, 17 Mar 2011 23:22:47 +0800 Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:message-id:from:to:subject:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=a7eVLuY6OOzA5f1f4i9fNGASDDkaLFADzTaeSH2kxAY=; b=EPfI2IHNHETtDayrbdjIt40Id7lK7G5AUuoBqQ92ndD3mTBN6t/paHwoUq/VWCb+Z5 GaGzA/ByC/vgV38JyxN1xrPRBtNnsHSCns26IXbRd1v33bsWMXvjgYMYeuWJwzG4Dc0d od2LMBhIG2Hsa+u7sDcI9a8C9KX1FHkARGW3k= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:message-id:from:to:subject:in-reply-to:references:user-agent :mime-version:content-type:content-transfer-encoding; b=gpWf74x5C7X9+K6LttifmyDtCwEnuZgrz/3hqFC77yxWRaVv3GASnV3BXdOsg0irAC eIoWZOXYTKLrTj4ZbLOh7Q2a6S+Vl/2oumGM5yAQShCZoMWAtKjNI3lTpwGYh73L+pCM 4lABuznU9rGlZZlrCxAULgiYH4sP6zGqrPPJk= In-reply-to: List-id: SuperCollider users mailing list References: <18BB188B-00F9-4275-9C7F-E45892259F3A@xxxxxxxxx> <878vwellbk.wl%jamshark70@xxxxxxxxxxxxxxxxx> Reply-to: sc-users@xxxxxxxxxxxxxxxx Sender: owner-sc-users@xxxxxxxxxxxxxxxx User-agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 Emacs/23.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) At Thu, 17 Mar 2011 07:45:44 -0700, Chris Brown wrote: > Then how can I create suspedal objects on port 1, 2, etc that are also on channel 0 ? > Is that not possible? I don't see any argument for additional ports on the same channel... VoicerSusPedal takes the same port/channel designations as VoicerMIDISocket, so you can simply write the same thing that you wrote for the sockets. There are a couple of shortcut syntaxes. BasicMIDISocket help provides more details on the ways to write a port and channel. ~~~ Channel: the port and channel this socket should listen to. It may be specified several ways:  chan_num (simple integer): this number is the channel number; the port will be assumed 0 \omni: respond to any channel on port 0 nil: assume port 0, channel 0 [port_num, chan_num]: specify a port as well as channel. port_num can be the uid belonging to the port (see MIDIClient and MIDIEndPoint), or an integer index to the sources initialized by MIDIClient. [port_num, \omni]: respond to any channel on this port  ~~~ VoicerMIDISocket help includes an abbreviated version of this -- I suppose I should copy the full description everywhere it's relevant. These are consistent for all sockets and CCs in my library. So you could simplify the code like so. var sockets, pedals; MIDIPort.init; sockets = MIDIPort.sources.collect { |src, i| VoicerMIDISocket([i, 0], proxy) }; pedals = sockets.collect { |socket, i| VoicerSusPedal([i, 0], 64, socket) }; /* // or, get the channel identifier from the corresponding socket: pedals = sockets.collect { |socket| VoicerSusPedal(socket.parent.channel, 64, socket) }; */ hjh -- James Harkins /// dewdrop world jamshark70@xxxxxxxxxxxxxxxxx http://www.dewdrop-world.net "Come said the Muse, Sing me a song no poet has yet chanted, Sing me the universal." -- Whitman blog: http://www.dewdrop-world.net/words audio clips: http://www.dewdrop-world.net/audio more audio: http://soundcloud.com/dewdrop_world/tracks _______________________________________________ sc-users mailing list info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml archive: https://listarc.bham.ac.uk/marchives/sc-users/ search: https://listarc.bham.ac.uk/lists/sc-users/search/ Follow-Ups: Re: [sc-users] VoicerSusPedal question From: Chris Brown References: Re: [sc-users] VoicerSusPedal question From: Chris Brown Re: [sc-users] VoicerSusPedal question From: James Harkins Re: [sc-users] VoicerSusPedal question From: Chris Brown Prev by Date: Re: [sc-users] VoicerSusPedal question Next by Date: Re: [sc-users] EZSliders, CV and action Previous by thread: Re: [sc-users] VoicerSusPedal question Next by thread: Re: [sc-users] VoicerSusPedal question Index(es): Date Thread