csound 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/csound.rb +623 -0
  3. metadata +73 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3cd3db57e71fd3b7107a000a912ddd99ba78e7e3482006c918695f64abbd4e35
4
+ data.tar.gz: 1bb04c780a3ec13ba28fab32ed859071cda82005fe9f9344ebb5f8bc1ce213f9
5
+ SHA512:
6
+ metadata.gz: 2acac62033bae48d8579878f8e63c4642176d58a6ff04d0410fef4b63c54836ed3cd4c858f70d3fc2882d75b07a6afec923b5a938199c543f1db9d24a515052f
7
+ data.tar.gz: 9e82db9fe81413c6f570b73ae8943bd55dc163f049620c09d3734d550cd8e88e8201359ca49005685270b0ee6765be67e1566357778a753505933282ae991413
data/lib/csound.rb ADDED
@@ -0,0 +1,623 @@
1
+
2
+
3
+ require "bundler/inline"
4
+
5
+ gemfile do
6
+ source "https://rubygems.org"
7
+ gem "ffi", require: true
8
+ end
9
+
10
+ module CsoundModule
11
+ extend FFI::Library
12
+ ffi_lib '/usr/local/lib/libcsound64.so'
13
+
14
+
15
+ attach_function :csoundCreate,[:pointer],:pointer
16
+ attach_function :csoundInitialize,[:int],:int
17
+ attach_function :csoundDestroy,[:pointer],:void
18
+ attach_function :csoundGetVersion,[],:int
19
+ attach_function :csoundGetAPIVersion,[],:int
20
+ attach_function :csoundCompileTree,[:pointer,:pointer],:int
21
+ attach_function :csoundCompileTreeAsync,[:pointer,:pointer],:int
22
+ attach_function :csoundDeleteTree,[:pointer,:pointer],:void
23
+ attach_function :csoundCompileOrc,[:pointer,:string],:int
24
+ attach_function :csoundCompileOrcAsync,[:pointer,:string],:int
25
+ attach_function :csoundEvalCode,[:pointer,:string],:double
26
+ attach_function :csoundInitializeCscore,[:pointer,:pointer,:pointer],:int
27
+ attach_function :csoundCompileArgs,[:pointer,:int,:pointer],:int
28
+ attach_function :csoundStart,[:pointer],:int
29
+ attach_function :csoundCompile,[:pointer,:int,:pointer],:int
30
+ attach_function :csoundCompileCsd,[:pointer,:string],:int
31
+ attach_function :csoundCompileCsdText,[:pointer,:string],:int
32
+ attach_function :csoundPerform,[:pointer],:int
33
+ attach_function :csoundPerformKsmps,[:pointer],:int
34
+ attach_function :csoundPerformBuffer,[:pointer],:int
35
+ attach_function :csoundStop,[:pointer],:void
36
+ attach_function :csoundCleanup,[:pointer],:int
37
+ attach_function :csoundReset,[:pointer],:void
38
+ attach_function :csoundUDPServerStart,[:pointer,:uint],:int
39
+ attach_function :csoundUDPServerStatus,[:pointer],:int
40
+ attach_function :csoundUDPServerClose,[:pointer],:int
41
+ attach_function :csoundStopUDPConsole,[:pointer],:void
42
+ attach_function :csoundGetKr,[:pointer],:double
43
+ attach_function :csoundGetKsmps,[:pointer],:uint32
44
+ attach_function :csoundGetNchnls,[:pointer],:uint32
45
+ attach_function :csoundGetNchnlsInput,[:pointer],:uint32
46
+ attach_function :csoundGetCurrentTimeSamples,[:pointer],:int64
47
+ attach_function :csoundGetSizeOfMYFLT,[],:int
48
+ attach_function :csoundSetHostData,[:pointer,:pointer],:void
49
+ attach_function :csoundSetOption,[:pointer,:string],:int
50
+ attach_function :csoundSetParams,[:pointer,:pointer],:void
51
+ attach_function :csoundGetParams,[:pointer,:pointer],:void
52
+ attach_function :csoundGetDebug,[:pointer],:int
53
+ attach_function :csoundSetDebug,[:pointer,:int],:void
54
+ attach_function :csoundSystemSr,[:pointer,:double],:double
55
+ attach_function :csoundSetInput,[:pointer,:string],:void
56
+ attach_function :csoundSetMIDIInput,[:pointer,:string],:void
57
+ attach_function :csoundSetMIDIFileInput,[:pointer,:string],:void
58
+ attach_function :csoundSetMIDIOutput,[:pointer,:string],:void
59
+ attach_function :csoundSetMIDIFileOutput,[:pointer,:string],:void
60
+ attach_function :csoundSetRTAudioModule,[:pointer,:string],:void
61
+ attach_function :csoundGetInputBufferSize,[:pointer],:long
62
+ attach_function :csoundGetOutputBufferSize,[:pointer],:long
63
+ attach_function :csoundClearSpin,[:pointer],:void
64
+ attach_function :csoundGetSpoutSample,[:pointer,:int,:int],:double
65
+ attach_function :csoundSetRtcloseCallback,[:pointer,:void],:void
66
+ attach_function :csoundSetMIDIModule,[:pointer,:string],:void
67
+ attach_function :csoundReadScore,[:pointer,:string],:int
68
+ attach_function :csoundReadScoreAsync,[:pointer,:string],:void
69
+ attach_function :csoundGetScoreTime,[:pointer],:double
70
+ attach_function :csoundIsScorePending,[:pointer],:int
71
+ attach_function :csoundSetScorePending,[:pointer,:int],:void
72
+ attach_function :csoundGetScoreOffsetSeconds,[:pointer],:double
73
+ attach_function :csoundSetScoreOffsetSeconds,[:pointer,:double],:void
74
+ attach_function :csoundRewindScore,[:pointer],:void
75
+ attach_function :csoundScoreSort,[:pointer,:pointer,:pointer],:int
76
+ attach_function :csoundMessage,[:pointer,:string],:void
77
+ attach_function :csoundGetMessageLevel,[:pointer],:int
78
+ attach_function :csoundSetMessageLevel,[:pointer,:int],:void
79
+ attach_function :csoundCreateMessageBuffer,[:pointer,:int],:void
80
+ attach_function :csoundGetFirstMessageAttr,[:pointer],:int
81
+ attach_function :csoundPopFirstMessage,[:pointer],:void
82
+ attach_function :csoundGetMessageCnt,[:pointer],:int
83
+ attach_function :csoundDestroyMessageBuffer,[:pointer],:void
84
+ attach_function :csoundListChannels,[:pointer,:pointer],:int
85
+ attach_function :csoundDeleteChannelList,[:pointer,:pointer],:void
86
+ attach_function :csoundGetChannelDatasize,[:pointer,:string],:int
87
+ attach_function :csoundInputMessage,[:pointer,:string],:void
88
+ attach_function :csoundInputMessageAsync,[:pointer,:string],:void
89
+ attach_function :csoundKeyPress,[:pointer,:char],:void
90
+ attach_function :csoundTableLength,[:pointer,:int],:int
91
+ attach_function :csoundTableGet,[:pointer,:int,:int],:double
92
+ attach_function :csoundTableSet,[:pointer,:int,:int,:double],:void
93
+ attach_function :csoundTableCopyOut,[:pointer,:int,:pointer],:void
94
+ attach_function :csoundTableCopyOutAsync,[:pointer,:int,:pointer],:void
95
+ attach_function :csoundTableCopyIn,[:pointer,:int,:pointer],:void
96
+ attach_function :csoundTableCopyInAsync,[:pointer,:int,:pointer],:void
97
+ attach_function :csoundGetTable,[:pointer,:pointer,:int],:int
98
+ attach_function :csoundGetTableArgs,[:pointer,:pointer,:int],:int
99
+ attach_function :csoundIsNamedGEN,[:pointer,:int],:int
100
+ attach_function :csoundGetNamedGEN,[:pointer,:int,:pointer,:int],:void
101
+ attach_function :csoundSetIsGraphable,[:pointer,:int],:int
102
+ attach_function :csoundNewOpcodeList,[:pointer,:pointer],:int
103
+ attach_function :csoundDisposeOpcodeList,[:pointer,:pointer],:void
104
+ attach_function :csoundSetYieldCallback,[:pointer,:int],:void
105
+ attach_function :csoundJoinThread,[:pointer],:pointer
106
+ attach_function :csoundWaitThreadLock,[:pointer,:size_t],:int
107
+ attach_function :csoundWaitThreadLockNoTimeout,[:pointer],:void
108
+ attach_function :csoundNotifyThreadLock,[:pointer],:void
109
+ attach_function :csoundDestroyThreadLock,[:pointer],:void
110
+ attach_function :csoundLockMutex,[:pointer],:void
111
+ attach_function :csoundLockMutexNoWait,[:pointer],:int
112
+ attach_function :csoundUnlockMutex,[:pointer],:void
113
+ attach_function :csoundDestroyMutex,[:pointer],:void
114
+ attach_function :csoundDestroyBarrier,[:pointer],:int
115
+ attach_function :csoundWaitBarrier,[:pointer],:int
116
+ attach_function :csoundCondWait,[:pointer,:pointer],:void
117
+ attach_function :csoundCondSignal,[:pointer],:void
118
+ attach_function :csoundSleep,[:size_t],:void
119
+ attach_function :csoundSpinLockInit,[:pointer],:int
120
+ attach_function :csoundSpinLock,[:pointer],:void
121
+ attach_function :csoundSpinTryLock,[:pointer],:int
122
+ attach_function :csoundSpinUnLock,[:pointer],:void
123
+ attach_function :csoundRunCommand,[:pointer,:int],:long
124
+ attach_function :csoundInitTimerStruct,[:pointer],:void
125
+ attach_function :csoundGetRealTime,[:pointer],:double
126
+ attach_function :csoundGetCPUTime,[:pointer],:double
127
+ attach_function :csoundGetRandomSeedFromTime,[],:uint32
128
+ attach_function :csoundSetGlobalEnv,[:string,:string],:int
129
+ attach_function :csoundDestroyGlobalVariable,[:pointer,:string],:int
130
+ attach_function :csoundDeleteUtilityList,[:pointer,:pointer],:void
131
+ attach_function :csoundRandMT,[:pointer],:uint32
132
+ attach_function :csoundFlushCircularBuffer,[:pointer,:pointer],:void
133
+ attach_function :csoundDestroyCircularBuffer,[:pointer,:pointer],:void
134
+ attach_function :csoundOpenLibrary,[:pointer,:string],:int
135
+ attach_function :csoundCloseLibrary,[:pointer],:int
136
+
137
+ end
138
+
139
+ class Csound
140
+ @csound = nil
141
+ def initialize(flags=0, host_data=nil)
142
+ @csound = CsoundModule.csoundCreate(host_data)
143
+ end
144
+
145
+ def Destroy()
146
+ return CsoundModule.csoundDestroy(@csound)
147
+ end
148
+
149
+ def GetVersion()
150
+ return CsoundModule.csoundGetVersion()
151
+ end
152
+
153
+ def GetAPIVersion()
154
+ return CsoundModule.csoundGetAPIVersion()
155
+ end
156
+
157
+ def CompileTree(root)
158
+ return CsoundModule.csoundCompileTree(@csound, root)
159
+ end
160
+
161
+ def CompileTreeAsync(root)
162
+ return CsoundModule.csoundCompileTreeAsync(@csound, root)
163
+ end
164
+
165
+ def DeleteTree(tree)
166
+ return CsoundModule.csoundDeleteTree(@csound, tree)
167
+ end
168
+
169
+ def CompileOrc(str)
170
+ return CsoundModule.csoundCompileOrc(@csound, str)
171
+ end
172
+
173
+ def CompileOrcAsync(str)
174
+ return CsoundModule.csoundCompileOrcAsync(@csound, str)
175
+ end
176
+
177
+ def EvalCode(str)
178
+ return CsoundModule.csoundEvalCode(@csound, str)
179
+ end
180
+
181
+ def InitializeCscore(insco, outsco)
182
+ return CsoundModule.csoundInitializeCscore(insco, outsco)
183
+ end
184
+
185
+ def CompileArgs(argc, argv)
186
+ return CsoundModule.csoundCompileArgs(argc, argv)
187
+ end
188
+
189
+ def Start()
190
+ return CsoundModule.csoundStart(@csound)
191
+ end
192
+
193
+ def Compile(argc, argv)
194
+ return CsoundModule.csoundCompile(argc, argv)
195
+ end
196
+
197
+ def CompileCsd(csd)
198
+ return CsoundModule.csoundCompileCsd(@csound, csd)
199
+ end
200
+
201
+ def CompileCsdText(csd)
202
+ return CsoundModule.csoundCompileCsdText(@csound, csd)
203
+ end
204
+
205
+ def Perform()
206
+ return CsoundModule.csoundPerform(@csound)
207
+ end
208
+
209
+ def PerformKsmps()
210
+ return CsoundModule.csoundPerformKsmps(@csound)
211
+ end
212
+
213
+ def PerformBuffer()
214
+ return CsoundModule.csoundPerformBuffer(@csound)
215
+ end
216
+
217
+ def Stop()
218
+ return CsoundModule.csoundStop(@csound)
219
+ end
220
+
221
+ def Cleanup()
222
+ return CsoundModule.csoundCleanup(@csound)
223
+ end
224
+
225
+ def Reset()
226
+ return CsoundModule.csoundReset(@csound)
227
+ end
228
+
229
+ def UDPServerStart(port)
230
+ return CsoundModule.csoundUDPServerStart(@csound, port)
231
+ end
232
+
233
+ def UDPServerStatus()
234
+ return CsoundModule.csoundUDPServerStatus(@csound)
235
+ end
236
+
237
+ def UDPServerClose()
238
+ return CsoundModule.csoundUDPServerClose(@csound)
239
+ end
240
+
241
+ def StopUDPConsole()
242
+ return CsoundModule.csoundStopUDPConsole(@csound)
243
+ end
244
+
245
+ def GetKr()
246
+ return CsoundModule.csoundGetKr(@csound)
247
+ end
248
+
249
+ def GetKsmps()
250
+ return CsoundModule.csoundGetKsmps(@csound)
251
+ end
252
+
253
+ def GetNchnls()
254
+ return CsoundModule.csoundGetNchnls(@csound)
255
+ end
256
+
257
+ def GetNchnlsInput()
258
+ return CsoundModule.csoundGetNchnlsInput(@csound)
259
+ end
260
+
261
+ def GetCurrentTimeSamples()
262
+ return CsoundModule.csoundGetCurrentTimeSamples(@csound)
263
+ end
264
+
265
+ def GetSizeOfMYFLT()
266
+ return CsoundModule.csoundGetSizeOfMYFLT()
267
+ end
268
+
269
+ def SetHostData(hostData)
270
+ return CsoundModule.csoundSetHostData(hostData)
271
+ end
272
+
273
+ def SetOption(option)
274
+ return CsoundModule.csoundSetOption(@csound, option)
275
+ end
276
+
277
+ def SetParams(p)
278
+ return CsoundModule.csoundSetParams(@csound, p)
279
+ end
280
+
281
+ def GetParams(p)
282
+ return CsoundModule.csoundGetParams(@csound, p)
283
+ end
284
+
285
+ def GetDebug()
286
+ return CsoundModule.csoundGetDebug(@csound)
287
+ end
288
+
289
+ def SetDebug(debug)
290
+ return CsoundModule.csoundSetDebug(debug)
291
+ end
292
+
293
+ def SystemSr(val)
294
+ return CsoundModule.csoundSystemSr(@csound, val)
295
+ end
296
+
297
+ def SetInput(name)
298
+ return CsoundModule.csoundSetInput(@csound, name)
299
+ end
300
+
301
+ def SetMIDIInput(name)
302
+ return CsoundModule.csoundSetMIDIInput(@csound, name)
303
+ end
304
+
305
+ def SetMIDIFileInput(name)
306
+ return CsoundModule.csoundSetMIDIFileInput(@csound, name)
307
+ end
308
+
309
+ def SetMIDIOutput(name)
310
+ return CsoundModule.csoundSetMIDIOutput(@csound, name)
311
+ end
312
+
313
+ def SetMIDIFileOutput(name)
314
+ return CsoundModule.csoundSetMIDIFileOutput(@csound, name)
315
+ end
316
+
317
+ def SetRTAudioModule(rtmodule)
318
+ return CsoundModule.csoundSetRTAudioModule(@csound, rtmodule)
319
+ end
320
+
321
+ def GetInputBufferSize()
322
+ return CsoundModule.csoundGetInputBufferSize(@csound)
323
+ end
324
+
325
+ def GetOutputBufferSize()
326
+ return CsoundModule.csoundGetOutputBufferSize(@csound)
327
+ end
328
+
329
+ def ClearSpin()
330
+ return CsoundModule.csoundClearSpin(@csound)
331
+ end
332
+
333
+ def GetSpoutSample(frame, channel)
334
+ return CsoundModule.csoundGetSpoutSample(@csound, frame, channel)
335
+ end
336
+
337
+ def SetRtcloseCallback(arg_void)
338
+ return CsoundModule.csoundSetRtcloseCallback(arg_void)
339
+ end
340
+
341
+ def SetMIDIModule(rtmodule)
342
+ return CsoundModule.csoundSetMIDIModule(@csound, rtmodule)
343
+ end
344
+
345
+ def ReadScore(str)
346
+ return CsoundModule.csoundReadScore(@csound, str)
347
+ end
348
+
349
+ def ReadScoreAsync(str)
350
+ return CsoundModule.csoundReadScoreAsync(@csound, str)
351
+ end
352
+
353
+ def GetScoreTime()
354
+ return CsoundModule.csoundGetScoreTime(@csound)
355
+ end
356
+
357
+ def IsScorePending()
358
+ return CsoundModule.csoundIsScorePending(@csound)
359
+ end
360
+
361
+ def SetScorePending(pending)
362
+ return CsoundModule.csoundSetScorePending(pending)
363
+ end
364
+
365
+ def GetScoreOffsetSeconds()
366
+ return CsoundModule.csoundGetScoreOffsetSeconds(@csound)
367
+ end
368
+
369
+ def SetScoreOffsetSeconds(time)
370
+ return CsoundModule.csoundSetScoreOffsetSeconds(time)
371
+ end
372
+
373
+ def RewindScore()
374
+ return CsoundModule.csoundRewindScore(@csound)
375
+ end
376
+
377
+ def ScoreSort(inFile, outFile)
378
+ return CsoundModule.csoundScoreSort(inFile, outFile)
379
+ end
380
+
381
+ def Message(format)
382
+ return CsoundModule.csoundMessage(format)
383
+ end
384
+
385
+ def GetMessageLevel()
386
+ return CsoundModule.csoundGetMessageLevel(@csound)
387
+ end
388
+
389
+ def SetMessageLevel(messageLevel)
390
+ return CsoundModule.csoundSetMessageLevel(messageLevel)
391
+ end
392
+
393
+ def CreateMessageBuffer(toStdOut)
394
+ return CsoundModule.csoundCreateMessageBuffer(@csound, toStdOut)
395
+ end
396
+
397
+ def GetFirstMessageAttr()
398
+ return CsoundModule.csoundGetFirstMessageAttr(@csound)
399
+ end
400
+
401
+ def PopFirstMessage()
402
+ return CsoundModule.csoundPopFirstMessage(@csound)
403
+ end
404
+
405
+ def GetMessageCnt()
406
+ return CsoundModule.csoundGetMessageCnt(@csound)
407
+ end
408
+
409
+ def DestroyMessageBuffer()
410
+ return CsoundModule.csoundDestroyMessageBuffer(@csound)
411
+ end
412
+
413
+ def ListChannels(lst)
414
+ return CsoundModule.csoundListChannels(lst)
415
+ end
416
+
417
+ def DeleteChannelList(lst)
418
+ return CsoundModule.csoundDeleteChannelList(lst)
419
+ end
420
+
421
+ def GetChannelDatasize(name)
422
+ return CsoundModule.csoundGetChannelDatasize(@csound, name)
423
+ end
424
+
425
+ def InputMessage(message)
426
+ return CsoundModule.csoundInputMessage(message)
427
+ end
428
+
429
+ def InputMessageAsync(message)
430
+ return CsoundModule.csoundInputMessageAsync(message)
431
+ end
432
+
433
+ def KeyPress(c)
434
+ return CsoundModule.csoundKeyPress(c)
435
+ end
436
+
437
+ def TableLength(table)
438
+ return CsoundModule.csoundTableLength(table)
439
+ end
440
+
441
+ def TableGet(table, index)
442
+ return CsoundModule.csoundTableGet(table, index)
443
+ end
444
+
445
+ def TableSet(table, index, value)
446
+ return CsoundModule.csoundTableSet(table, index, value)
447
+ end
448
+
449
+ def TableCopyOut(table, dest)
450
+ return CsoundModule.csoundTableCopyOut(@csound, table, dest)
451
+ end
452
+
453
+ def TableCopyOutAsync(table, dest)
454
+ return CsoundModule.csoundTableCopyOutAsync(@csound, table, dest)
455
+ end
456
+
457
+ def TableCopyIn(table, src)
458
+ return CsoundModule.csoundTableCopyIn(@csound, table, src)
459
+ end
460
+
461
+ def TableCopyInAsync(table, src)
462
+ return CsoundModule.csoundTableCopyInAsync(@csound, table, src)
463
+ end
464
+
465
+ def GetTable(tablePtr, tableNum)
466
+ return CsoundModule.csoundGetTable(tablePtr, tableNum)
467
+ end
468
+
469
+ def GetTableArgs(argsPtr, tableNum)
470
+ return CsoundModule.csoundGetTableArgs(@csound, argsPtr, tableNum)
471
+ end
472
+
473
+ def IsNamedGEN(num)
474
+ return CsoundModule.csoundIsNamedGEN(@csound, num)
475
+ end
476
+
477
+ def GetNamedGEN(num, name, len)
478
+ return CsoundModule.csoundGetNamedGEN(@csound, num, name, len)
479
+ end
480
+
481
+ def SetIsGraphable(isGraphable)
482
+ return CsoundModule.csoundSetIsGraphable(isGraphable)
483
+ end
484
+
485
+ def NewOpcodeList(opcodelist)
486
+ return CsoundModule.csoundNewOpcodeList(opcodelist)
487
+ end
488
+
489
+ def DisposeOpcodeList(opcodelist)
490
+ return CsoundModule.csoundDisposeOpcodeList(opcodelist)
491
+ end
492
+
493
+ def SetYieldCallback(arg_int)
494
+ return CsoundModule.csoundSetYieldCallback(arg_int)
495
+ end
496
+
497
+ def JoinThread(thread)
498
+ return CsoundModule.csoundJoinThread(thread)
499
+ end
500
+
501
+ def WaitThreadLock(lock, milliseconds)
502
+ return CsoundModule.csoundWaitThreadLock(lock, milliseconds)
503
+ end
504
+
505
+ def WaitThreadLockNoTimeout(lock)
506
+ return CsoundModule.csoundWaitThreadLockNoTimeout(lock)
507
+ end
508
+
509
+ def NotifyThreadLock(lock)
510
+ return CsoundModule.csoundNotifyThreadLock(lock)
511
+ end
512
+
513
+ def DestroyThreadLock(lock)
514
+ return CsoundModule.csoundDestroyThreadLock(lock)
515
+ end
516
+
517
+ def LockMutex(mutex)
518
+ return CsoundModule.csoundLockMutex(mutex)
519
+ end
520
+
521
+ def LockMutexNoWait(mutex)
522
+ return CsoundModule.csoundLockMutexNoWait(mutex)
523
+ end
524
+
525
+ def UnlockMutex(mutex)
526
+ return CsoundModule.csoundUnlockMutex(mutex)
527
+ end
528
+
529
+ def DestroyMutex(mutex)
530
+ return CsoundModule.csoundDestroyMutex(mutex)
531
+ end
532
+
533
+ def DestroyBarrier(barrier)
534
+ return CsoundModule.csoundDestroyBarrier(barrier)
535
+ end
536
+
537
+ def WaitBarrier(barrier)
538
+ return CsoundModule.csoundWaitBarrier(barrier)
539
+ end
540
+
541
+ def CondWait(condVar, mutex)
542
+ return CsoundModule.csoundCondWait(condVar, mutex)
543
+ end
544
+
545
+ def CondSignal(condVar)
546
+ return CsoundModule.csoundCondSignal(condVar)
547
+ end
548
+
549
+ def Sleep(milliseconds)
550
+ return CsoundModule.csoundSleep(milliseconds)
551
+ end
552
+
553
+ def SpinLockInit(spinlock)
554
+ return CsoundModule.csoundSpinLockInit(spinlock)
555
+ end
556
+
557
+ def SpinLock(spinlock)
558
+ return CsoundModule.csoundSpinLock(spinlock)
559
+ end
560
+
561
+ def SpinTryLock(spinlock)
562
+ return CsoundModule.csoundSpinTryLock(spinlock)
563
+ end
564
+
565
+ def SpinUnLock(spinlock)
566
+ return CsoundModule.csoundSpinUnLock(spinlock)
567
+ end
568
+
569
+ def RunCommand(argv, noWait)
570
+ return CsoundModule.csoundRunCommand(argv, noWait)
571
+ end
572
+
573
+ def InitTimerStruct(arg_pointer)
574
+ return CsoundModule.csoundInitTimerStruct(arg_pointer)
575
+ end
576
+
577
+ def GetRealTime(arg_pointer)
578
+ return CsoundModule.csoundGetRealTime(arg_pointer)
579
+ end
580
+
581
+ def GetCPUTime(arg_pointer)
582
+ return CsoundModule.csoundGetCPUTime(arg_pointer)
583
+ end
584
+
585
+ def GetRandomSeedFromTime()
586
+ return CsoundModule.csoundGetRandomSeedFromTime()
587
+ end
588
+
589
+ def SetGlobalEnv(name, value)
590
+ return CsoundModule.csoundSetGlobalEnv(name, value)
591
+ end
592
+
593
+ def DestroyGlobalVariable(name)
594
+ return CsoundModule.csoundDestroyGlobalVariable(name)
595
+ end
596
+
597
+ def DeleteUtilityList(lst)
598
+ return CsoundModule.csoundDeleteUtilityList(lst)
599
+ end
600
+
601
+ def RandMT(p)
602
+ return CsoundModule.csoundRandMT(p)
603
+ end
604
+
605
+ def FlushCircularBuffer(p)
606
+ return CsoundModule.csoundFlushCircularBuffer(@csound, p)
607
+ end
608
+
609
+ def DestroyCircularBuffer(circularbuffer)
610
+ return CsoundModule.csoundDestroyCircularBuffer(@csound, circularbuffer)
611
+ end
612
+
613
+ def OpenLibrary(library, libraryPath)
614
+ return CsoundModule.csoundOpenLibrary(library, libraryPath)
615
+ end
616
+
617
+ def CloseLibrary(library)
618
+ return CsoundModule.csoundCloseLibrary(library)
619
+ end
620
+
621
+ end
622
+
623
+
metadata ADDED
@@ -0,0 +1,73 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: csound
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Johann Philippe
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-12-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: ffi
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.11'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.11'
41
+ description: Csound for Ruby, through FFI
42
+ email: johannphilippe@lilo.org
43
+ executables: []
44
+ extensions: []
45
+ extra_rdoc_files: []
46
+ files:
47
+ - lib/csound.rb
48
+ homepage: https://rubygems.org/gems/csound
49
+ licenses:
50
+ - LGPL-2.1
51
+ metadata:
52
+ allowed_push_host: https://rubygems.org
53
+ post_install_message:
54
+ rdoc_options: []
55
+ require_paths:
56
+ - lib
57
+ required_ruby_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ required_rubygems_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ requirements: []
68
+ rubyforge_project:
69
+ rubygems_version: 2.7.6
70
+ signing_key:
71
+ specification_version: 4
72
+ summary: Csound Gem for Ruby
73
+ test_files: []