File: csound%2Bhtml-template.csd

package info (click to toggle)
csoundqt 1.1.1%2Bdfsg0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 103,216 kB
  • sloc: cpp: 37,640; python: 2,070; xml: 2,034; sh: 340; makefile: 20; perl: 8
file content (81 lines) | stat: -rw-r--r-- 1,606 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
; Template for Csound-wasm html file that runs also in CsoundQt, Csound For Android and elsewhere
; (c) Tarmo Johannes 2018

<html>
  <head>
  </head>
  <body bgcolor="lightgreen">
   <h2>Csd+html template</h2><br>
   Press "Run" in CsoundQt (or other host) to start the csd. 
   <br><br>
   Frequency: 
   <input type="range" id="slider" min="100" max="1000" oninput='csound.setControlChannel("freq",parseFloat(value)); '></input><br>
    <button id="button" onclick='csound.readScore("i 1 0 3")' >Event</button>
   <br>
  </body>
</html>

<CsoundSynthesizer>
<CsOptions>
-odac -d
</CsOptions>
<CsInstruments>

sr = 44100
nchnls = 2
0dbfs = 1
ksmps = 32

chnset 400, "freq" 

instr 1 
  kfreq chnget "freq"
  printk2 kfreq
  aenv linen 1,0.1,p3,0.25
  out poscil(0.5,kfreq)*aenv
endin


</CsInstruments>
<CsScore>
</CsScore>
</CsoundSynthesizer>



<bsbPanel>
 <label>Widgets</label>
 <objectName/>
 <x>100</x>
 <y>100</y>
 <width>320</width>
 <height>240</height>
 <visible>true</visible>
 <uuid/>
 <bgcolor mode="nobackground">
  <r>255</r>
  <g>255</g>
  <b>255</b>
 </bgcolor>
 <bsbObject type="BSBButton" version="2">
  <objectName>button0</objectName>
  <x>10</x>
  <y>19</y>
  <width>100</width>
  <height>30</height>
  <uuid>{d5a1d1e3-eb6f-461c-90dc-95647307dc87}</uuid>
  <visible>true</visible>
  <midichan>0</midichan>
  <midicc>0</midicc>
  <type>event</type>
  <pressedValue>1.00000000</pressedValue>
  <stringvalue/>
  <text>Play</text>
  <image>/</image>
  <eventLine>i1 0 1</eventLine>
  <latch>false</latch>
  <latched>false</latched>
 </bsbObject>
</bsbPanel>
<bsbPresets>
</bsbPresets>