Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android, Soundfonts pitch and playback issues #1783

Closed
giovannibedetti opened this issue Nov 9, 2023 · 39 comments
Closed

Android, Soundfonts pitch and playback issues #1783

giovannibedetti opened this issue Nov 9, 2023 · 39 comments

Comments

@giovannibedetti
Copy link

I am experiencing a weird behaviour with Sound Fonts on Android. I have no issues with the same csd on a Windows machine.
I can replicate the issue with the soundfont used in the examples, sf_GMbank.sf2.
With this sound font, the pitch of the played notes behaves erratically and it's wrong for some notes.
With other sound fonts I tried (for example the MuseScore generic SF), most of the presets don't play at all.
This (zipped) csd shows the issue
TestSoundFonts_Android.zip
The issue may be related with the handling of presets, since soundfonts with a single preset don't have the same issue and play correctly.
Tested with the Csound for Android app (Csound 6.18.1), Cabbage for Android (Csound 6.08), and CsoundUnity 3.4.1 (Csound 6.18) (sorry but I failed to build the Android repo)

See this Cabbage thread for more info.

@ST-Music
Copy link

ST-Music commented Nov 9, 2023

I can confirm the issue using Csound for Android ver 39, library 6181, as well as with the Cabbage Android app. Using iflag = 1 and controlling the pitch with kfreq doesn't help. Purely synth patches seem OK, the problem seems to be with sample-based ones. Have tried using various sfinstr & sfplay opcodes as well as multiple sf2 files including the above mentioned and FluidR3_GM.sf2

The sf2 files play fine using the Fluid Synth Android app

I have not yet tried the Csound fluid opcodes but am aware they apparantly can't be used with CsoundUnity.

Edit: with the fluid opcodes, all tested sf2 files did in fact work correctly.

@kunstmusik
Copy link
Member

I've moved to a new computer and currently unable to build Csound Android for Csound 6 or 7 and thus unable to diagnose this. I think @rorywalsh had mentioned he might take on Android maintenance. If so, could you perhaps take a look?

@vlazzarini
Copy link
Member

Is this at all related to #1721 ?

@giovannibedetti
Copy link
Author

It could be related, but this one is Android only. I have the expected behaviour and output on Windows and Mac.
I haven't tried on iOS.
There are two issues:

  • pitch issues (listen to this)
  • when there are multiple presets in a sound font, most of them are completely silent. Sound fonts with a single preset seem to work correctly.

@vlazzarini
Copy link
Member

Ok. Just to clarify, because I am confused with the the other post in this issue:

  1. Is this issue limited to the sfont opcodes (sfplay etc) or is this a problem with the fluidsynth opcodes?

  2. Does it work correctly on Windows with no issues?

One major difference is that Android is a floats build. Endianness is the same (?), but if that was a problem the sfont file would not even open.

@ST-Music
Copy link

ST-Music commented Jan 2, 2024 via email

@vlazzarini
Copy link
Member

ok thanks. At least with the sfont opcodes it's our own code so in theory we can fix it.

I looked at the code and nothing jumps at me as a possible difference between Android and desktop. First I will need to confirm the issue is not present on the desktop. I will do that and report back.

Then I will need someone who can build and test any changes I push as I don't have Android here. We'll get there.

@vlazzarini
Copy link
Member

vlazzarini commented Jan 3, 2024

I can confirm that both @ST-Music latest example and the earlier example posted by @giovannibedetti work as I expect on my Mac using 6.18 (and they should work on 7, but since Android is in a bit of a disarray under develop, we'll debug this using 6.19 beta).

I was listening to @giovannibedetti 's examples (from soundcloud and the CSD he posted) and I noticed that the patches seem to change quicker in the soundcloud example with the wrong pitches. Is that produced by the same CSD?
I also noticed that there is one patch that seems to play the scale correctly.

The code to set the pitch does this (sfplay, splay3, sfinstr):

  1. defines a tuning correction based on splits coarse and fine tuning and layer coarse and fine tuning
            double tuneCorrection = split->coarseTune + layer->coarseTune +
              (split->fineTune + layer->fineTune)*0.01;
  1. gets the original frequency from a 12TET table, which may depend on a split overriding key or sample original key number
            int32_t orgkey = split->overridingRootKey;
            if (orgkey == -1) orgkey = sample->byOriginalKey;
            orgfreq = globals->pitches[orgkey];
  1. It then sets the base frequency for that note from the original key, tuning correction and a scale tuning set
    in the split
              freq = orgfreq * pow(2.0, ONETWELTH * tuneCorrection) *
                pow(2.0, ONETWELTH * (split->scaleTuning*0.01) * (notnum-orgkey));

In performance, this frequency can be modulated by the xfreq parameter.

So assuming, the data is correctly read from the sfont files, I can't really see that code executing differently on Android. Does that sound right?

I may need to examine the file reading part.

@vlazzarini
Copy link
Member

Ok I found a possible issue. Fine and coarse tuning settings were kept as char which is unsigned by default in gcc on Android. The code distinguishes char and BYTE and the latter is defined as unsigned, so I am presuming without doing any checking in the soundfont standard that char has been used to mean signed. That would explain the crazy tuning. Also without doing too much checking it appears char is signed on MacOS, which would makes the code work correctly.

I have pushed ceaad74 with a fix for this and it continues to work on MacOS. Now we need some brave soul to build from csound6 on Android to see if that made any difference. Any takers (@rorywalsh ?)

@giovannibedetti
Copy link
Author

Thanks so much for the investigation, I can try building for Android in a couple of hours and report back.
The linked SoundCloud example was generated with a different csd (to be found here) but the result I got with the one I posted here was similar.

@giovannibedetti
Copy link
Author

I tried building but failed again on Windows. Unfortunately I'll have no other OS available for some days. If someone is able to build, I can test though! Just send me the /arm64-v8a/libcsoundandroid.so file and I'll be able to test using CsoundUnity

@vlazzarini
Copy link
Member

Ok, I had a go and it wasn't too difficult to get the NDK and build Csound here:
csound-android.zip

@giovannibedetti
Copy link
Author

I updated the so lib on CsoundUnity and tried a quick Android build with the csd I posted in the first message. Still no improvements on the silent presets (almost all of them are silent), so I cannot really say if the pitch is fixed. One scale I could hear was correct (despite the fact that it skipped the first C note), but another preset was complete garbage.
Tomorrow I will add more info on the UI (to see the current preset and the current note/pitch) and will record a video to show what happens. Also, I will do the same recording with the old lib so that we can evaluate the effect of the changes.
Thanks for now!

@vlazzarini
Copy link
Member

Could you try with the one from soundcloud? That one seemed to have all sounds loud and clear. The sf2 that comes with Csound was used I think.

@giovannibedetti
Copy link
Author

I will try later this evening!

@giovannibedetti
Copy link
Author

I recorded some videos on Windows (editor) and Android (with and without the fix), they can be found here.
On Windows all is good.
On Android, the behaviour with or without the fix is basically the same, only a few presets are producing sound.
Interestingly, one that works correctly is preset 10, which is the one that comes from the acousticGuitar sound font (07AcousticGuitar.sf2). Also some percussive presets are working. Other presets are producing garbage sound.
I wasn't able to reproduce the pitch issues though.
I used this csd:

<Cabbage>
form caption("Sequencer"), size(300, 200)
rslider bounds(108, 78, 60, 60) channel("BPM") range(30, 300, 130, 1, 0.001)
rslider bounds(202, 76, 60, 60) channel("patch") range(0, 308, 0, 1, 1)
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -m 2
</CsOptions>
<CsInstruments>

; By  Menno Knevel - 2020

sr = 48000
ksmps = 64
nchnls = 2
0dbfs  = 1



; load in two soundfonts
isf	sfload	"sf_GMbank.sf2"
ir	sfload	"07AcousticGuitar.sf2"
	sfplist isf
	sfplist ir
; first sf_GMbank.sf2 is loaded and assigned to start at 0 and counting up to 308
; as there are 309 presets in sf_GMbank.sf2 (0-308).
; then 07AcousticGuitar.sf2 is loaded and assigned to replace the 10th preset of already loaded sf_GMbank.sf2
	sfpassign	0, isf	
	sfpassign	10, ir

instr SEQUENCER
    kBeat init 0
    kPatch = abs(chnget:k("patch"))
    kBPM = abs(chnget:k("BPM"))
    kNotes[] fillarray 60, 62, 64, 65, 67, 69, 71, 72    
    
    if metro(kBPM/60) == 1 then
        event "i", "PlayVoice", 0, 0.75, kNotes[kBeat], kPatch
        kBeat = (kBeat < 7 ? kBeat+1 : 0)
    endif
endin

instr PlayVoice
iptc    =   p5
inum	=	p4
idur    =   p3
ivel	=	100
kamp	linsegr	1, idur, 0, .1, 0
kamp	= kamp/500000						;scale amplitude
kfreq	=	1						;do not change freq from sf
a1,a2	sfplay3	ivel, inum, kamp*ivel, kfreq, iptc			;preset index = 60
	outs	a1, a2
endin

</CsInstruments>
<CsScore>
f0 z
i"SEQUENCER" 0 z
</CsScore>
</CsoundSynthesizer>

For completeness, the list of the presets listed in the sound fonts:

Presets

Preset list of "sf_GMbank.sf2"

  1. Grand Piano prog:0 bank:0
  2. Bright Grand Piano prog:1 bank:0
  3. Electric Grand prog:2 bank:0
  4. Honky-Tonk Piano prog:3 bank:0
  5. Tine Electric Piano prog:4 bank:0
  6. FM Electric Piano prog:5 bank:0
  7. Harpsichord prog:6 bank:0
  8. Clavinet prog:7 bank:0
  9. Celesta prog:8 bank:0
  10. Glockenspiel prog:9 bank:0
  11. Music Box prog:10 bank:0
  12. Vibraphone prog:11 bank:0
  13. Marimba prog:12 bank:0
  14. Xylophone prog:13 bank:0
  15. Tubular Bells prog:14 bank:0
  16. Dulcimer prog:15 bank:0
  17. Drawbar Organ prog:16 bank:0
  18. Percussive Organ prog:17 bank:0
  19. Rock Organ prog:18 bank:0
  20. Church Organ prog:19 bank:0
  21. Reed Organ prog:20 bank:0
  22. Accordion prog:21 bank:0
  23. Harmonica prog:22 bank:0
  24. Bandoneon prog:23 bank:0
  25. Nylon String Guitar prog:24 bank:0
  26. Steel String Guitar prog:25 bank:0
  27. Jazz Guitar prog:26 bank:0
  28. Clean Guitar prog:27 bank:0
  29. Palm Muted Guitar prog:28 bank:0
  30. Overdrive Guitar prog:29 bank:0
  31. Distortion Guitar prog:30 bank:0
  32. Guitar Harmonics prog:31 bank:0
  33. Acoustic Bass prog:32 bank:0
  34. Fingered Bass prog:33 bank:0
  35. Picked Bass prog:34 bank:0
  36. Fretless Bass prog:35 bank:0
  37. Slap Bass prog:36 bank:0
  38. Pop Bass prog:37 bank:0
  39. Synth Bass 1 prog:38 bank:0
  40. Synth Bass 2 prog:39 bank:0
  41. Violin prog:40 bank:0
  42. Viola prog:41 bank:0
  43. Cello prog:42 bank:0
  44. Contrabass prog:43 bank:0
  45. Strings Tremolo prog:44 bank:0
  46. Strings Pizzicato prog:45 bank:0
  47. Harp prog:46 bank:0
  48. Timpani prog:47 bank:0
  49. Strings Fast prog:48 bank:0
  50. Strings Slow prog:49 bank:0
  51. Synth Strings 1 prog:50 bank:0
  52. Synth Strings 2 prog:51 bank:0
  53. Choir Aahs prog:52 bank:0
  54. Voice Oohs prog:53 bank:0
  55. Synth Voice prog:54 bank:0
  56. Orchestra Hit prog:55 bank:0
  57. Trumpet prog:56 bank:0
  58. Trombone prog:57 bank:0
  59. Tuba prog:58 bank:0
  60. Harmon Mute Trumpet prog:59 bank:0
  61. French Horns prog:60 bank:0
  62. Brass Section prog:61 bank:0
  63. Synth Brass 1 prog:62 bank:0
  64. Synth Brass 2 prog:63 bank:0
  65. Soprano Sax prog:64 bank:0
  66. Alto Sax prog:65 bank:0
  67. Tenor Sax prog:66 bank:0
  68. Baritone Sax prog:67 bank:0
  69. Oboe prog:68 bank:0
  70. English Horn prog:69 bank:0
  71. Bassoon prog:70 bank:0
  72. Clarinet prog:71 bank:0
  73. Piccolo prog:72 bank:0
  74. Flute prog:73 bank:0
  75. Recorder prog:74 bank:0
  76. Pan Flute prog:75 bank:0
  77. Bottle Chiff prog:76 bank:0
  78. Shakuhachi prog:77 bank:0
  79. Whistle prog:78 bank:0
  80. Ocarina prog:79 bank:0
  81. Square Lead prog:80 bank:0
  82. Saw Lead prog:81 bank:0
  83. Calliope Lead prog:82 bank:0
  84. Chiffer Lead prog:83 bank:0
  85. Charang prog:84 bank:0
  86. Solo Vox prog:85 bank:0
  87. 5th Saw Wave prog:86 bank:0
  88. Bass & Lead prog:87 bank:0
  89. Fantasia prog:88 bank:0
  90. Warm Pad prog:89 bank:0
  91. Polysynth prog:90 bank:0
  92. Space Voice prog:91 bank:0
  93. Bowed Glass prog:92 bank:0
  94. Metal Pad prog:93 bank:0
  95. Halo Pad prog:94 bank:0
  96. Sweep Pad prog:95 bank:0
  97. Ice Rain prog:96 bank:0
  98. Soundtrack prog:97 bank:0
  99. Crystal prog:98 bank:0
  100. Atmosphere prog:99 bank:0
  101. Brightness prog:100 bank:0
  102. Goblin prog:101 bank:0
  103. Echo Drops prog:102 bank:0
  104. Star Theme prog:103 bank:0
  105. Sitar prog:104 bank:0
  106. Banjo prog:105 bank:0
  107. Shamisen prog:106 bank:0
  108. Koto prog:107 bank:0
  109. Kalimba prog:108 bank:0
  110. Bagpipe prog:109 bank:0
  111. Fiddle prog:110 bank:0
  112. Shenai prog:111 bank:0
  113. Tinker Bell prog:112 bank:0
  114. Agogo prog:113 bank:0
  115. Steel Drums prog:114 bank:0
  116. Woodblock prog:115 bank:0
  117. Taiko Drum prog:116 bank:0
  118. Melodic Tom prog:117 bank:0
  119. Synth Drum prog:118 bank:0
  120. Reverse Cymbal prog:119 bank:0
  121. Fret Noise prog:120 bank:0
  122. Breath Noise prog:121 bank:0
  123. Sea Shore prog:122 bank:0
  124. Bird Tweet prog:123 bank:0
  125. Telephone prog:124 bank:0
  126. Helicopter prog:125 bank:0
  127. Applause prog:126 bank:0
  128. Gun Shot prog:127 bank:0
  129. Temple Blocks prog:115 bank:1
  130. Mellow Grand Piano prog:0 bank:8
  131. Detuned Tine EP prog:4 bank:8
  132. Detuned FM EP prog:5 bank:8
  133. Coupled Harpsichord prog:6 bank:8
  134. Church Bell prog:14 bank:8
  135. Detuned Organ 1 prog:16 bank:8
  136. Detuned Organ 2 prog:17 bank:8
  137. Church Organ 2 prog:19 bank:8
  138. Italian Accordion prog:21 bank:8
  139. Ukulele prog:24 bank:8
  140. 12-String Guitar prog:25 bank:8
  141. Hawaiian Guitar prog:26 bank:8
  142. Funk Guitar prog:28 bank:8
  143. Feedback Guitar prog:30 bank:8
  144. Guitar Feedback prog:31 bank:8
  145. Synth Bass 3 prog:38 bank:8
  146. Synth Bass 4 prog:39 bank:8
  147. Slow Violin prog:40 bank:8
  148. Orchestral Pad prog:48 bank:8
  149. Synth Strings 3 prog:50 bank:8
  150. Brass 2 prog:61 bank:8
  151. Synth Brass 3 prog:62 bank:8
  152. Synth Brass 4 prog:63 bank:8
  153. Sine Wave prog:80 bank:8
  154. Taisho Koto prog:107 bank:8
  155. Castanets prog:115 bank:8
  156. Concert Bass Drum prog:116 bank:8
  157. Melo Tom 2 prog:117 bank:8
  158. 808 Tom prog:118 bank:8
  159. Mandolin prog:25 bank:16
  160. Drawbar Organ Expr. prog:16 bank:17
  161. Perc. Organ Expr. prog:17 bank:17
  162. Rock Organ Expr. prog:18 bank:17
  163. Church Organ Expr. prog:19 bank:17
  164. Reed Organ Expr. prog:20 bank:17
  165. Accordion Expr. prog:21 bank:17
  166. Harmonica Expr. prog:22 bank:17
  167. Bandoneon Expr. prog:23 bank:17
  168. Violin Expr. prog:40 bank:17
  169. Viola Expr. prog:41 bank:17
  170. Cello Expr. prog:42 bank:17
  171. Contrabass Expr. prog:43 bank:17
  172. Strings Trem Expr. prog:44 bank:17
  173. Strings Fast Expr. prog:48 bank:17
  174. Strings Slow Expr. prog:49 bank:17
  175. Syn. Strings 1 Expr.2 prog:50 bank:17
  176. Syn. Strings 2 Expr.3 prog:51 bank:17
  177. Choir Aahs Expr. prog:52 bank:17
  178. Voice Oohs Expr. prog:53 bank:17
  179. Synth Voice Expr. prog:54 bank:17
  180. Trumpet Expr. prog:56 bank:17
  181. Trombone Expr. prog:57 bank:17
  182. Tuba Expr. prog:58 bank:17
  183. Hmn. Mute Tpt. Expr.; prog:59 bank:17
  184. French Horns Expr. prog:60 bank:17
  185. Brass Section Expr. prog:61 bank:17
  186. Synth Brass 1 Expr. prog:62 bank:17
  187. Synth Brass 2 Expr. prog:63 bank:17
  188. Soprano Sax Expr. prog:64 bank:17
  189. Alto Sax Expr. prog:65 bank:17
  190. Tenor Sax Expr. prog:66 bank:17
  191. Baritone Sax Expr. prog:67 bank:17
  192. Oboe Expr. prog:68 bank:17
  193. English Horn Expr. prog:69 bank:17
  194. Bassoon Expr. prog:70 bank:17
  195. Clarinet Expr. prog:71 bank:17
  196. Piccolo Expr. prog:72 bank:17
  197. Flute Expr. prog:73 bank:17
  198. Recorder Expr. prog:74 bank:17
  199. Pan Flute Expr. prog:75 bank:17
  200. Bottle Chiff Expr. prog:76 bank:17
  201. Shakuhachi Expr. prog:77 bank:17
  202. Whistle Expr. prog:78 bank:17
  203. Ocarina Expr. prog:79 bank:17
  204. Square Lead Expr. prog:80 bank:17
  205. Saw Lead Expr. prog:81 bank:17
  206. Calliope Lead Expr. prog:82 bank:17
  207. Chiffer Lead Expr. prog:83 bank:17
  208. Charang Expr. prog:84 bank:17
  209. Solo Vox Expr. prog:85 bank:17
  210. 5th Saw Wave Expr. prog:86 bank:17
  211. Bass & Lead Expr. prog:87 bank:17
  212. Warm Pad Expr. prog:89 bank:17
  213. Polysynth Expr. prog:90 bank:17
  214. Space Voice Expr. prog:91 bank:17
  215. Bowed Glass Expr. prog:92 bank:17
  216. Metal Pad Expr. prog:93 bank:17
  217. Halo Pad Expr. prog:94 bank:17
  218. Sweep Pad Expr. prog:95 bank:17
  219. Soundtrack Expr. prog:97 bank:17
  220. Atmosphere Expr. prog:99 bank:17
  221. Goblin Expr. prog:101 bank:17
  222. Echo Drops Expr. prog:102 bank:17
  223. Star Theme Expr. prog:103 bank:17
  224. Fiddle Expr. prog:110 bank:17
  225. Shenai Expr. prog:111 bank:17
  226. Detuned Org. 1 Expr.^P prog:16 bank:18
  227. Detuned Org. 2 Expr.^Q prog:17 bank:18
  228. Church Organ 2 Expr.^S prog:19 bank:18
  229. It. Accordion Expr. prog:21 bank:18
  230. Slow Violin Expr. prog:40 bank:18
  231. Synth Strings3 Expr.2 prog:50 bank:18
  232. Brass 2 Expr. prog:61 bank:18
  233. Synth Brass 3 Expr. prog:62 bank:18
  234. Synth Brass 4 Expr. prog:63 bank:18
  235. Sine Wave Expr. prog:80 bank:18
  236. Violins Tremolo prog:44 bank:20
  237. Violins Pizzicato prog:45 bank:20
  238. Violins Fast prog:48 bank:20
  239. Violins Slow prog:49 bank:20
  240. Detuned Saw prog:81 bank:20
  241. Violins Trem Expr. prog:44 bank:21
  242. Violins Fast Expr. prog:48 bank:21
  243. Violins Slow Expr. prog:49 bank:21
  244. Detuned Saw Expr. prog:81 bank:21
  245. Violins2 Tremolo prog:44 bank:25
  246. Violins2 Pizzicato prog:45 bank:25
  247. Violins2 Fast prog:48 bank:25
  248. Violins2 Slow prog:49 bank:25
  249. Violins2 Trem Expr. prog:44 bank:26
  250. Violins2 Fast Expr. prog:48 bank:26
  251. Violins2 Slow Expr. prog:49 bank:26
  252. Violas Tremolo prog:44 bank:30
  253. Violas Pizzicato prog:45 bank:30
  254. Violas Fast prog:48 bank:30
  255. Violas Slow prog:49 bank:30
  256. Violas Trem Expr. prog:44 bank:31
  257. Violas Fast Expr. prog:48 bank:31
  258. Violas Slow Expr. prog:49 bank:31
  259. Celli Tremolo prog:44 bank:40
  260. Celli Pizzicato prog:45 bank:40
  261. Celli Fast prog:48 bank:40
  262. Celli Slow prog:49 bank:40
  263. Celli Trem Expr. prog:44 bank:41
  264. Celli Fast Expr. prog:48 bank:41
  265. Celli Slow Expr. prog:49 bank:41
  266. Basses Tremolo prog:44 bank:50
  267. Basses Pizzicato prog:45 bank:50
  268. Basses Fast prog:48 bank:50
  269. Basses Slow prog:49 bank:50
  270. Basses Trem Expr. prog:44 bank:51
  271. Basses Fast Expr. prog:48 bank:51
  272. Basses Slow Expr. prog:49 bank:51
  273. Standard prog:0 bank:128
  274. Standard 1 prog:1 bank:128
  275. Standard 2 prog:2 bank:128
  276. Standard 3 prog:3 bank:128
  277. Standard 4 prog:4 bank:128
  278. Standard 5 prog:5 bank:128
  279. Standard 6 prog:6 bank:128
  280. Standard 7 prog:7 bank:128
  281. Room prog:8 bank:128
  282. Room 1 prog:9 bank:128
  283. Room 2 prog:10 bank:128
  284. Room 3 prog:11 bank:128
  285. Room 4 prog:12 bank:128
  286. Room 5 prog:13 bank:128
  287. Room 6 prog:14 bank:128
  288. Room 7 prog:15 bank:128
  289. Power prog:16 bank:128
  290. Power 1 prog:17 bank:128
  291. Power 2 prog:18 bank:128
  292. Power 3 prog:19 bank:128
  293. Electronic prog:24 bank:128
  294. TR-808 prog:25 bank:128
  295. Jazz prog:32 bank:128
  296. Jazz 1 prog:33 bank:128
  297. Jazz 2 prog:34 bank:128
  298. Jazz 3 prog:35 bank:128
  299. Jazz 4 prog:36 bank:128
  300. Brush prog:40 bank:128
  301. Brush 1 prog:41 bank:128
  302. Brush 2 prog:42 bank:128
  303. Orchestra Kit prog:48 bank:128
  304. Marching Snare prog:56 bank:128
  305. OldMarchingBass prog:57 bank:128
  306. Marching Cymbals prog:58 bank:128
  307. Marching Bass prog:59 bank:128
  308. OldMarchingTenor prog:95 bank:128
  309. Marching Tenor prog:96 bank:128

Preset list of "07AcousticGuitar.sf2"

  1. Seagul Acoustic Git prog:0 bank:0

@vlazzarini
Copy link
Member

It seems we have a different issue? It would be better if we could tackle the pitch problem first, then move on to this.

Is it possible to reproduce this?

@vlazzarini
Copy link
Member

vlazzarini commented Jan 7, 2024

@giovannibedetti does the printed present list look exactly the same on Android and on Windows/Desktop? The selected sounds are not. For example preset 7 sounds different and preset 16 is also different (with weird tuning). I tested your CSD on MacOS and I hear different sounds from the few that work on Android.

A first thought is that somehow volume is set to 0 on the silent ones, but it may also be that the selected presets are just empty.

@vlazzarini
Copy link
Member

vlazzarini commented Jan 7, 2024

I still can't see what the issue can be with presets in particular. However, the unsigned/signed issue seems to be real, and I think I might not have fixed all of it in my first attempt. Could you try this new library file:
csound-android-80123.zip

vlazzarini pushed a commit that referenced this issue Jan 7, 2024
@ST-Music
Copy link

ST-Music commented Jan 7, 2024 via email

@vlazzarini
Copy link
Member

@ST-Music did you try my latest build above?

@giovannibedetti
Copy link
Author

Thank you Victor. I'm sorry for the late reply, I'm travelling and I won't be able to test the build until tomorrow.

@ST-Music
Copy link

ST-Music commented Jan 8, 2024 via email

@giovannibedetti
Copy link
Author

giovannibedetti commented Jan 10, 2024

I just tested the new build, the behaviour is the same as before.
The presets list looks exactly the same on Windows and Android.
I am still not able to reproduce the pitch issue though.

Full log here ```

2024/01/10 11:45:23.659 30317 30362 Info Unity CsoundUnity Awake
2024/01/10 11:45:23.659 30317 30362 Info Unity AudioSettings.bufferSize: 1024 numBuffers: 4
2024/01/10 11:45:23.678 30317 30362 Info Unity Setting SFDIR for Android to: /storage/emulated/0/Android/data/com.Csound.CsoundUnity_Development_3_4/files/CsoundFiles
2024/01/10 11:45:23.704 30317 30317 Warn UnityMain type=1400 audit(0.0:1357): avc: denied { read } for name="/" dev="dm-16" ino=2 scontext=u:r:untrusted_app_32:s0:c177,c257,c512,c768 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0 app=com.Csound.CsoundUnity_Development_3_4
2024/01/10 11:45:24.204 30317 30362 Info Unity Csound created and started.
2024/01/10 11:45:24.204 30317 30362 Info Unity AudioSettings.outputSampleRate: 48000
2024/01/10 11:45:24.204 30317 30362 Info Unity GetSr: 48000
2024/01/10 11:45:24.204 30317 30362 Info Unity GetKr: 48000
2024/01/10 11:45:24.204 30317 30362 Info Unity Get0dbfs: 1
2024/01/10 11:45:24.204 30317 30362 Info Unity GetKsmps: 1
2024/01/10 11:45:24.219 30317 30362 Info Unity instr SEQUENCER uses instrument number 1
2024/01/10 11:45:24.219 30317 30362 Info Unity Csound zerdbfs: 1
2024/01/10 11:45:24.219 30317 30362 Info Unity CsoundUnity done init, compiledOk? True
2024/01/10 11:45:24.497 30317 30362 Info Unity instr PlayVoice uses instrument number 2
2024/01/10 11:45:24.498 30317 30362 Info Unity --Csound version 6.18 (float samples) Oct 27 2022
2024/01/10 11:45:24.498 30317 30362 Info Unity [commit: GIT_HASH_VALUE]
2024/01/10 11:45:24.583 30317 30362 Info Unity libsndfile-1.0.25
2024/01/10 11:45:24.616 30317 30362 Info Unity displays suppressed
2024/01/10 11:45:24.648 30317 30362 Info Unity sr = 48000.0,
2024/01/10 11:45:24.694 30317 30362 Info Unity kr = 48000.000,
2024/01/10 11:45:24.727 30317 30362 Info Unity ksmps = 1
2024/01/10 11:45:24.761 30317 30362 Info Unity 0dBFS level = 1.0,
2024/01/10 11:45:24.794 30317 30362 Info Unity A4 tuning = 440.0
2024/01/10 11:45:24.828 30317 30362 Info Unity Preset list of "/storage/emulated/0/Android/data/com.Csound.CsoundUnity_Development_3_4/files/CsoundFiles/sf_GMbank.sf2"
2024/01/10 11:45:24.861 30317 30362 Info Unity 0) Grand Piano prog:0 bank:0
2024/01/10 11:45:24.895 30317 30362 Info Unity 1) Bright Grand Piano prog:1 bank:0
2024/01/10 11:45:24.928 30317 30362 Info Unity 2) Electric Grand prog:2 bank:0
2024/01/10 11:45:24.961 30317 30362 Info Unity 3) Honky-Tonk Piano prog:3 bank:0
2024/01/10 11:45:24.995 30317 30362 Info Unity 4) Tine Electric Piano prog:4 bank:0
2024/01/10 11:45:25.028 30317 30362 Info Unity 5) FM Electric Piano prog:5 bank:0
2024/01/10 11:45:25.062 30317 30362 Info Unity 6) Harpsichord prog:6 bank:0
2024/01/10 11:45:25.095 30317 30362 Info Unity 7) Clavinet prog:7 bank:0
2024/01/10 11:45:25.128 30317 30362 Info Unity 8) Celesta prog:8 bank:0
2024/01/10 11:45:25.162 30317 30362 Info Unity 9) Glockenspiel prog:9 bank:0
2024/01/10 11:45:25.195 30317 30362 Info Unity 10) Music Box prog:10 bank:0
2024/01/10 11:45:25.229 30317 30362 Info Unity 11) Vibraphone prog:11 bank:0
2024/01/10 11:45:25.262 30317 30362 Info Unity 12) Marimba prog:12 bank:0
2024/01/10 11:45:25.296 30317 30362 Info Unity 13) Xylophone prog:13 bank:0
2024/01/10 11:45:25.329 30317 30362 Info Unity 14) Tubular Bells prog:14 bank:0
2024/01/10 11:45:25.362 30317 30362 Info Unity 15) Dulcimer prog:15 bank:0
2024/01/10 11:45:25.396 30317 30362 Info Unity 16) Drawbar Organ prog:16 bank:0
2024/01/10 11:45:25.429 30317 30362 Info Unity 17) Percussive Organ prog:17 bank:0
2024/01/10 11:45:25.463 30317 30362 Info Unity 18) Rock Organ prog:18 bank:0
2024/01/10 11:45:25.496 30317 30362 Info Unity 19) Church Organ prog:19 bank:0
2024/01/10 11:45:25.535 30317 30362 Info Unity 20) Reed Organ prog:20 bank:0
2024/01/10 11:45:25.563 30317 30362 Info Unity 21) Accordion prog:21 bank:0
2024/01/10 11:45:25.596 30317 30362 Info Unity 22) Harmonica prog:22 bank:0
2024/01/10 11:45:25.630 30317 30362 Info Unity 23) Bandoneon prog:23 bank:0
2024/01/10 11:45:25.663 30317 30362 Info Unity 24) Nylon String Guitar prog:24 bank:0
2024/01/10 11:45:25.697 30317 30362 Info Unity 25) Steel String Guitar prog:25 bank:0
2024/01/10 11:45:25.730 30317 30362 Info Unity 26) Jazz Guitar prog:26 bank:0
2024/01/10 11:45:25.764 30317 30362 Info Unity 27) Clean Guitar prog:27 bank:0
2024/01/10 11:45:25.797 30317 30362 Info Unity 28) Palm Muted Guitar prog:28 bank:0
2024/01/10 11:45:25.830 30317 30362 Info Unity 29) Overdrive Guitar prog:29 bank:0
2024/01/10 11:45:25.864 30317 30362 Info Unity 30) Distortion Guitar prog:30 bank:0
2024/01/10 11:45:25.897 30317 30362 Info Unity 31) Guitar Harmonics prog:31 bank:0
2024/01/10 11:45:25.931 30317 30362 Info Unity 32) Acoustic Bass prog:32 bank:0
2024/01/10 11:45:25.964 30317 30362 Info Unity 33) Fingered Bass prog:33 bank:0
2024/01/10 11:45:25.998 30317 30362 Info Unity 34) Picked Bass prog:34 bank:0
2024/01/10 11:45:26.031 30317 30362 Info Unity 35) Fretless Bass prog:35 bank:0
2024/01/10 11:45:26.064 30317 30362 Info Unity 36) Slap Bass prog:36 bank:0
2024/01/10 11:45:26.098 30317 30362 Info Unity 37) Pop Bass prog:37 bank:0
2024/01/10 11:45:26.131 30317 30362 Info Unity 38) Synth Bass 1 prog:38 bank:0
2024/01/10 11:45:26.165 30317 30362 Info Unity 39) Synth Bass 2 prog:39 bank:0
2024/01/10 11:45:26.198 30317 30362 Info Unity 40) Violin prog:40 bank:0
2024/01/10 11:45:26.237 30317 30362 Info Unity 41) Viola prog:41 bank:0
2024/01/10 11:45:26.265 30317 30362 Info Unity 42) Cello prog:42 bank:0
2024/01/10 11:45:26.299 30317 30362 Info Unity 43) Contrabass prog:43 bank:0
2024/01/10 11:45:26.332 30317 30362 Info Unity 44) Strings Tremolo prog:44 bank:0
2024/01/10 11:45:26.365 30317 30362 Info Unity 45) Strings Pizzicato prog:45 bank:0
2024/01/10 11:45:26.399 30317 30362 Info Unity 46) Harp prog:46 bank:0
2024/01/10 11:45:26.432 30317 30362 Info Unity 47) Timpani prog:47 bank:0
2024/01/10 11:45:26.466 30317 30362 Info Unity 48) Strings Fast prog:48 bank:0
2024/01/10 11:45:26.499 30317 30362 Info Unity 49) Strings Slow prog:49 bank:0
2024/01/10 11:45:26.532 30317 30362 Info Unity 50) Synth Strings 1 prog:50 bank:0
2024/01/10 11:45:26.566 30317 30362 Info Unity 51) Synth Strings 2 prog:51 bank:0
2024/01/10 11:45:26.599 30317 30362 Info Unity 52) Choir Aahs prog:52 bank:0
2024/01/10 11:45:26.633 30317 30362 Info Unity 53) Voice Oohs prog:53 bank:0
2024/01/10 11:45:26.666 30317 30362 Info Unity 54) Synth Voice prog:54 bank:0
2024/01/10 11:45:26.700 30317 30362 Info Unity 55) Orchestra Hit prog:55 bank:0
2024/01/10 11:45:26.733 30317 30362 Info Unity 56) Trumpet prog:56 bank:0
2024/01/10 11:45:26.767 30317 30362 Info Unity 57) Trombone prog:57 bank:0
2024/01/10 11:45:26.800 30317 30362 Info Unity 58) Tuba prog:58 bank:0
2024/01/10 11:45:26.833 30317 30362 Info Unity 59) Harmon Mute Trumpet prog:59 bank:0
2024/01/10 11:45:26.867 30317 30362 Info Unity 60) French Horns prog:60 bank:0
2024/01/10 11:45:26.900 30317 30362 Info Unity 61) Brass Section prog:61 bank:0
2024/01/10 11:45:26.933 30317 30362 Info Unity 62) Synth Brass 1 prog:62 bank:0
2024/01/10 11:45:26.967 30317 30362 Info Unity 63) Synth Brass 2 prog:63 bank:0
2024/01/10 11:45:27.000 30317 30362 Info Unity 64) Soprano Sax prog:64 bank:0
2024/01/10 11:45:27.034 30317 30362 Info Unity 65) Alto Sax prog:65 bank:0
2024/01/10 11:45:27.067 30317 30362 Info Unity 66) Tenor Sax prog:66 bank:0
2024/01/10 11:45:27.101 30317 30362 Info Unity 67) Baritone Sax prog:67 bank:0
2024/01/10 11:45:27.134 30317 30362 Info Unity 68) Oboe prog:68 bank:0
2024/01/10 11:45:27.167 30317 30362 Info Unity 69) English Horn prog:69 bank:0
2024/01/10 11:45:27.201 30317 30362 Info Unity 70) Bassoon prog:70 bank:0
2024/01/10 11:45:27.234 30317 30362 Info Unity 71) Clarinet prog:71 bank:0
2024/01/10 11:45:27.268 30317 30362 Info Unity 72) Piccolo prog:72 bank:0
2024/01/10 11:45:27.301 30317 30362 Info Unity 73) Flute prog:73 bank:0
2024/01/10 11:45:27.335 30317 30362 Info Unity 74) Recorder prog:74 bank:0
2024/01/10 11:45:27.368 30317 30362 Info Unity 75) Pan Flute prog:75 bank:0
2024/01/10 11:45:27.401 30317 30362 Info Unity 76) Bottle Chiff prog:76 bank:0
2024/01/10 11:45:27.435 30317 30362 Info Unity 77) Shakuhachi prog:77 bank:0
2024/01/10 11:45:27.468 30317 30362 Info Unity 78) Whistle prog:78 bank:0
2024/01/10 11:45:27.502 30317 30362 Info Unity 79) Ocarina prog:79 bank:0
2024/01/10 11:45:27.535 30317 30362 Info Unity 80) Square Lead prog:80 bank:0
2024/01/10 11:45:27.569 30317 30362 Info Unity 81) Saw Lead prog:81 bank:0
2024/01/10 11:45:27.602 30317 30362 Info Unity 82) Calliope Lead prog:82 bank:0
2024/01/10 11:45:27.635 30317 30362 Info Unity 83) Chiffer Lead prog:83 bank:0
2024/01/10 11:45:27.669 30317 30362 Info Unity 84) Charang prog:84 bank:0
2024/01/10 11:45:27.702 30317 30362 Info Unity 85) Solo Vox prog:85 bank:0
2024/01/10 11:45:27.736 30317 30362 Info Unity 86) 5th Saw Wave prog:86 bank:0
2024/01/10 11:45:27.769 30317 30362 Info Unity 87) Bass & Lead prog:87 bank:0
2024/01/10 11:45:27.803 30317 30362 Info Unity 88) Fantasia prog:88 bank:0
2024/01/10 11:45:27.836 30317 30362 Info Unity 89) Warm Pad prog:89 bank:0
2024/01/10 11:45:27.869 30317 30362 Info Unity 90) Polysynth prog:90 bank:0
2024/01/10 11:45:27.903 30317 30362 Info Unity 91) Space Voice prog:91 bank:0
2024/01/10 11:45:27.936 30317 30362 Info Unity 92) Bowed Glass prog:92 bank:0
2024/01/10 11:45:27.970 30317 30362 Info Unity 93) Metal Pad prog:93 bank:0
2024/01/10 11:45:28.003 30317 30362 Info Unity 94) Halo Pad prog:94 bank:0
2024/01/10 11:45:28.037 30317 30362 Info Unity 95) Sweep Pad prog:95 bank:0
2024/01/10 11:45:28.070 30317 30362 Info Unity 96) Ice Rain prog:96 bank:0
2024/01/10 11:45:28.103 30317 30362 Info Unity 97) Soundtrack prog:97 bank:0
2024/01/10 11:45:28.137 30317 30362 Info Unity 98) Crystal prog:98 bank:0
2024/01/10 11:45:28.170 30317 30362 Info Unity 99) Atmosphere prog:99 bank:0
2024/01/10 11:45:28.204 30317 30362 Info Unity 100) Brightness prog:100 bank:0
2024/01/10 11:45:28.237 30317 30362 Info Unity 101) Goblin prog:101 bank:0
2024/01/10 11:45:28.270 30317 30362 Info Unity 102) Echo Drops prog:102 bank:0
2024/01/10 11:45:28.304 30317 30362 Info Unity 103) Star Theme prog:103 bank:0
2024/01/10 11:45:28.337 30317 30362 Info Unity 104) Sitar prog:104 bank:0
2024/01/10 11:45:28.371 30317 30362 Info Unity 105) Banjo prog:105 bank:0
2024/01/10 11:45:28.404 30317 30362 Info Unity 106) Shamisen prog:106 bank:0
2024/01/10 11:45:28.438 30317 30362 Info Unity 107) Koto prog:107 bank:0
2024/01/10 11:45:28.471 30317 30362 Info Unity 108) Kalimba prog:108 bank:0
2024/01/10 11:45:28.505 30317 30362 Info Unity 109) Bagpipe prog:109 bank:0
2024/01/10 11:45:28.538 30317 30362 Info Unity 110) Fiddle prog:110 bank:0
2024/01/10 11:45:28.571 30317 30362 Info Unity 111) Shenai prog:111 bank:0
2024/01/10 11:45:28.605 30317 30362 Info Unity 112) Tinker Bell prog:112 bank:0
2024/01/10 11:45:28.638 30317 30362 Info Unity 113) Agogo prog:113 bank:0
2024/01/10 11:45:28.671 30317 30362 Info Unity 114) Steel Drums prog:114 bank:0
2024/01/10 11:45:28.705 30317 30362 Info Unity 115) Woodblock prog:115 bank:0
2024/01/10 11:45:28.738 30317 30362 Info Unity 116) Taiko Drum prog:116 bank:0
2024/01/10 11:45:28.772 30317 30362 Info Unity 117) Melodic Tom prog:117 bank:0
2024/01/10 11:45:28.805 30317 30362 Info Unity 118) Synth Drum prog:118 bank:0
2024/01/10 11:45:28.839 30317 30362 Info Unity 119) Reverse Cymbal prog:119 bank:0
2024/01/10 11:45:28.872 30317 30362 Info Unity 120) Fret Noise prog:120 bank:0
2024/01/10 11:45:28.905 30317 30362 Info Unity 121) Breath Noise prog:121 bank:0
2024/01/10 11:45:28.939 30317 30362 Info Unity 122) Sea Shore prog:122 bank:0
2024/01/10 11:45:28.972 30317 30362 Info Unity 123) Bird Tweet prog:123 bank:0
2024/01/10 11:45:29.006 30317 30362 Info Unity 124) Telephone prog:124 bank:0
2024/01/10 11:45:29.039 30317 30362 Info Unity 125) Helicopter prog:125 bank:0
2024/01/10 11:45:29.073 30317 30362 Info Unity 126) Applause prog:126 bank:0
2024/01/10 11:45:29.106 30317 30362 Info Unity 127) Gun Shot prog:127 bank:0
2024/01/10 11:45:29.140 30317 30362 Info Unity 128) Temple Blocks prog:115 bank:1
2024/01/10 11:45:29.173 30317 30362 Info Unity 129) Mellow Grand Piano prog:0 bank:8
2024/01/10 11:45:29.206 30317 30362 Info Unity 130) Detuned Tine EP prog:4 bank:8
2024/01/10 11:45:29.240 30317 30362 Info Unity 131) Detuned FM EP prog:5 bank:8
2024/01/10 11:45:29.273 30317 30362 Info Unity 132) Coupled Harpsichord prog:6 bank:8
2024/01/10 11:45:29.307 30317 30362 Info Unity 133) Church Bell prog:14 bank:8
2024/01/10 11:45:29.340 30317 30362 Info Unity 134) Detuned Organ 1 prog:16 bank:8
2024/01/10 11:45:29.373 30317 30362 Info Unity 135) Detuned Organ 2 prog:17 bank:8
2024/01/10 11:45:29.407 30317 30362 Info Unity 136) Church Organ 2 prog:19 bank:8
2024/01/10 11:45:29.440 30317 30362 Info Unity 137) Italian Accordion prog:21 bank:8
2024/01/10 11:45:29.474 30317 30362 Info Unity 138) Ukulele prog:24 bank:8
2024/01/10 11:45:29.507 30317 30362 Info Unity 139) 12-String Guitar prog:25 bank:8
2024/01/10 11:45:29.546 30317 30362 Info Unity 140) Hawaiian Guitar prog:26 bank:8
2024/01/10 11:45:29.574 30317 30362 Info Unity 141) Funk Guitar prog:28 bank:8
2024/01/10 11:45:29.607 30317 30362 Info Unity 142) Feedback Guitar prog:30 bank:8
2024/01/10 11:45:29.641 30317 30362 Info Unity 143) Guitar Feedback prog:31 bank:8
2024/01/10 11:45:29.674 30317 30362 Info Unity 144) Synth Bass 3 prog:38 bank:8
2024/01/10 11:45:29.708 30317 30362 Info Unity 145) Synth Bass 4 prog:39 bank:8
2024/01/10 11:45:29.741 30317 30362 Info Unity 146) Slow Violin prog:40 bank:8
2024/01/10 11:45:29.775 30317 30362 Info Unity 147) Orchestral Pad prog:48 bank:8
2024/01/10 11:45:29.808 30317 30362 Info Unity 148) Synth Strings 3 prog:50 bank:8
2024/01/10 11:45:29.841 30317 30362 Info Unity 149) Brass 2 prog:61 bank:8
2024/01/10 11:45:29.875 30317 30362 Info Unity 150) Synth Brass 3 prog:62 bank:8
2024/01/10 11:45:29.908 30317 30362 Info Unity 151) Synth Brass 4 prog:63 bank:8
2024/01/10 11:45:29.942 30317 30362 Info Unity 152) Sine Wave prog:80 bank:8
2024/01/10 11:45:29.975 30317 30362 Info Unity 153) Taisho Koto prog:107 bank:8
2024/01/10 11:45:30.042 30317 30362 Info Unity 154) Castanets prog:115 bank:8
2024/01/10 11:45:30.075 30317 30362 Info Unity 155) Concert Bass Drum prog:116 bank:8
2024/01/10 11:45:30.109 30317 30362 Info Unity 156) Melo Tom 2 prog:117 bank:8
2024/01/10 11:45:30.142 30317 30362 Info Unity 157) 808 Tom prog:118 bank:8
2024/01/10 11:45:30.175 30317 30362 Info Unity 158) Mandolin prog:25 bank:16
2024/01/10 11:45:30.209 30317 30362 Info Unity 159) Drawbar Organ Expr. prog:16 bank:17
2024/01/10 11:45:30.242 30317 30362 Info Unity 160) Perc. Organ Expr. prog:17 bank:17
2024/01/10 11:45:30.276 30317 30362 Info Unity 161) Rock Organ Expr. prog:18 bank:17
2024/01/10 11:45:30.309 30317 30362 Info Unity 162) Church Organ Expr. prog:19 bank:17
2024/01/10 11:45:30.343 30317 30362 Info Unity 163) Reed Organ Expr. prog:20 bank:17
2024/01/10 11:45:30.604 30317 30362 Info Unity 164) Accordion Expr. prog:21 bank:17
2024/01/10 11:45:30.670 30317 30362 Info Unity 165) Harmonica Expr. prog:22 bank:17
2024/01/10 11:45:30.676 30317 30362 Info Unity 166) Bandoneon Expr. prog:23 bank:17
2024/01/10 11:45:30.709 30317 30362 Info Unity 167) Violin Expr. prog:40 bank:17
2024/01/10 11:45:30.745 30317 30362 Info Unity 168) Viola Expr. prog:41 bank:17
2024/01/10 11:45:30.775 30317 30362 Info Unity 169) Cello Expr. prog:42 bank:17
2024/01/10 11:45:30.809 30317 30362 Info Unity 170) Contrabass Expr. prog:43 bank:17
2024/01/10 11:45:30.842 30317 30362 Info Unity 171) Strings Trem Expr. prog:44 bank:17
2024/01/10 11:45:30.876 30317 30362 Info Unity 172) Strings Fast Expr. prog:48 bank:17
2024/01/10 11:45:30.909 30317 30362 Info Unity 173) Strings Slow Expr. prog:49 bank:17
2024/01/10 11:45:30.942 30317 30362 Info Unity 174) Syn. Strings 1 Expr.2 prog:50 bank:17
2024/01/10 11:45:30.976 30317 30362 Info Unity 175) Syn. Strings 2 Expr.3 prog:51 bank:17
2024/01/10 11:45:31.009 30317 30362 Info Unity 176) Choir Aahs Expr. prog:52 bank:17
2024/01/10 11:45:31.044 30317 30362 Info Unity 177) Voice Oohs Expr. prog:53 bank:17
2024/01/10 11:45:31.078 30317 30362 Info Unity 178) Synth Voice Expr. prog:54 bank:17
2024/01/10 11:45:31.111 30317 30362 Info Unity 179) Trumpet Expr. prog:56 bank:17
2024/01/10 11:45:31.145 30317 30362 Info Unity 180) Trombone Expr. prog:57 bank:17
2024/01/10 11:45:31.178 30317 30362 Info Unity 181) Tuba Expr. prog:58 bank:17
2024/01/10 11:45:31.211 30317 30362 Info Unity 182) Hmn. Mute Tpt. Expr.; prog:59 bank:17
2024/01/10 11:45:31.245 30317 30362 Info Unity 183) French Horns Expr. prog:60 bank:17
2024/01/10 11:45:31.278 30317 30362 Info Unity 184) Brass Section Expr. prog:61 bank:17
2024/01/10 11:45:31.311 30317 30362 Info Unity 185) Synth Brass 1 Expr. prog:62 bank:17
2024/01/10 11:45:31.345 30317 30362 Info Unity 186) Synth Brass 2 Expr. prog:63 bank:17
2024/01/10 11:45:31.379 30317 30362 Info Unity 187) Soprano Sax Expr. prog:64 bank:17
2024/01/10 11:45:31.412 30317 30362 Info Unity 188) Alto Sax Expr. prog:65 bank:17
2024/01/10 11:45:31.445 30317 30362 Info Unity 189) Tenor Sax Expr. prog:66 bank:17
2024/01/10 11:45:31.479 30317 30362 Info Unity 190) Baritone Sax Expr. prog:67 bank:17
2024/01/10 11:45:31.512 30317 30362 Info Unity 191) Oboe Expr. prog:68 bank:17
2024/01/10 11:45:31.546 30317 30362 Info Unity 192) English Horn Expr. prog:69 bank:17
2024/01/10 11:45:31.579 30317 30362 Info Unity 193) Bassoon Expr. prog:70 bank:17
2024/01/10 11:45:31.612 30317 30362 Info Unity 194) Clarinet Expr. prog:71 bank:17
2024/01/10 11:45:31.646 30317 30362 Info Unity 195) Piccolo Expr. prog:72 bank:17
2024/01/10 11:45:31.679 30317 30362 Info Unity 196) Flute Expr. prog:73 bank:17
2024/01/10 11:45:31.713 30317 30362 Info Unity 197) Recorder Expr. prog:74 bank:17
2024/01/10 11:45:31.746 30317 30362 Info Unity 198) Pan Flute Expr. prog:75 bank:17
2024/01/10 11:45:31.779 30317 30362 Info Unity 199) Bottle Chiff Expr. prog:76 bank:17
2024/01/10 11:45:31.813 30317 30362 Info Unity 200) Shakuhachi Expr. prog:77 bank:17
2024/01/10 11:45:31.846 30317 30362 Info Unity 201) Whistle Expr. prog:78 bank:17
2024/01/10 11:45:31.880 30317 30362 Info Unity 202) Ocarina Expr. prog:79 bank:17
2024/01/10 11:45:31.913 30317 30362 Info Unity 203) Square Lead Expr. prog:80 bank:17
2024/01/10 11:45:31.947 30317 30362 Info Unity 204) Saw Lead Expr. prog:81 bank:17
2024/01/10 11:45:31.980 30317 30362 Info Unity 205) Calliope Lead Expr. prog:82 bank:17
2024/01/10 11:45:32.014 30317 30362 Info Unity 206) Chiffer Lead Expr. prog:83 bank:17
2024/01/10 11:45:32.047 30317 30362 Info Unity 207) Charang Expr. prog:84 bank:17
2024/01/10 11:45:32.080 30317 30362 Info Unity 208) Solo Vox Expr. prog:85 bank:17
2024/01/10 11:45:32.114 30317 30362 Info Unity 209) 5th Saw Wave Expr. prog:86 bank:17
2024/01/10 11:45:32.147 30317 30362 Info Unity 210) Bass & Lead Expr. prog:87 bank:17
2024/01/10 11:45:32.181 30317 30362 Info Unity 211) Warm Pad Expr. prog:89 bank:17
2024/01/10 11:45:32.215 30317 30362 Info Unity 212) Polysynth Expr. prog:90 bank:17
2024/01/10 11:45:32.247 30317 30362 Info Unity 213) Space Voice Expr. prog:91 bank:17
2024/01/10 11:45:32.281 30317 30362 Info Unity 214) Bowed Glass Expr. prog:92 bank:17
2024/01/10 11:45:32.315 30317 30362 Info Unity 215) Metal Pad Expr. prog:93 bank:17
2024/01/10 11:45:32.348 30317 30362 Info Unity 216) Halo Pad Expr. prog:94 bank:17
2024/01/10 11:45:32.382 30317 30362 Info Unity 217) Sweep Pad Expr. prog:95 bank:17
2024/01/10 11:45:32.415 30317 30362 Info Unity 218) Soundtrack Expr. prog:97 bank:17
2024/01/10 11:45:32.448 30317 30362 Info Unity 219) Atmosphere Expr. prog:99 bank:17
2024/01/10 11:45:32.482 30317 30362 Info Unity 220) Goblin Expr. prog:101 bank:17
2024/01/10 11:45:32.515 30317 30362 Info Unity 221) Echo Drops Expr. prog:102 bank:17
2024/01/10 11:45:32.549 30317 30362 Info Unity 222) Star Theme Expr. prog:103 bank:17
2024/01/10 11:45:32.582 30317 30362 Info Unity 223) Fiddle Expr. prog:110 bank:17
2024/01/10 11:45:32.616 30317 30362 Info Unity 224) Shenai Expr. prog:111 bank:17
2024/01/10 11:45:32.649 30317 30362 Info Unity 225) Detuned Org. 1 Expr.^P prog:16 bank:18
2024/01/10 11:45:32.686 30317 30362 Info Unity 226) Detuned Org. 2 Expr.^Q prog:17 bank:18
2024/01/10 11:45:32.716 30317 30362 Info Unity 227) Church Organ 2 Expr.^S prog:19 bank:18
2024/01/10 11:45:32.749 30317 30362 Info Unity 228) It. Accordion Expr. prog:21 bank:18
2024/01/10 11:45:32.783 30317 30362 Info Unity 229) Slow Violin Expr. prog:40 bank:18
2024/01/10 11:45:32.816 30317 30362 Info Unity 230) Synth Strings3 Expr.2 prog:50 bank:18
2024/01/10 11:45:32.849 30317 30362 Info Unity 231) Brass 2 Expr. prog:61 bank:18
2024/01/10 11:45:32.882 30317 30362 Info Unity 232) Synth Brass 3 Expr. prog:62 bank:18
2024/01/10 11:45:32.916 30317 30362 Info Unity 233) Synth Brass 4 Expr. prog:63 bank:18
2024/01/10 11:45:32.949 30317 30362 Info Unity 234) Sine Wave Expr. prog:80 bank:18
2024/01/10 11:45:32.983 30317 30362 Info Unity 235) Violins Tremolo prog:44 bank:20
2024/01/10 11:45:33.016 30317 30362 Info Unity 236) Violins Pizzicato prog:45 bank:20
2024/01/10 11:45:33.083 30317 30362 Info Unity 237) Violins Fast prog:48 bank:20
2024/01/10 11:45:33.116 30317 30362 Info Unity 238) Violins Slow prog:49 bank:20
2024/01/10 11:45:33.150 30317 30362 Info Unity 239) Detuned Saw prog:81 bank:20
2024/01/10 11:45:33.183 30317 30362 Info Unity 240) Violins Trem Expr. prog:44 bank:21
2024/01/10 11:45:33.217 30317 30362 Info Unity 241) Violins Fast Expr. prog:48 bank:21
2024/01/10 11:45:33.250 30317 30362 Info Unity 242) Violins Slow Expr. prog:49 bank:21
2024/01/10 11:45:33.284 30317 30362 Info Unity 243) Detuned Saw Expr. prog:81 bank:21
2024/01/10 11:45:33.317 30317 30362 Info Unity 244) Violins2 Tremolo prog:44 bank:25
2024/01/10 11:45:33.351 30317 30362 Info Unity 245) Violins2 Pizzicato prog:45 bank:25
2024/01/10 11:45:33.384 30317 30362 Info Unity 246) Violins2 Fast prog:48 bank:25
2024/01/10 11:45:33.417 30317 30362 Info Unity 247) Violins2 Slow prog:49 bank:25
2024/01/10 11:45:33.451 30317 30362 Info Unity 248) Violins2 Trem Expr. prog:44 bank:26
2024/01/10 11:45:33.484 30317 30362 Info Unity 249) Violins2 Fast Expr. prog:48 bank:26
2024/01/10 11:45:33.518 30317 30362 Info Unity 250) Violins2 Slow Expr. prog:49 bank:26
2024/01/10 11:45:33.551 30317 30362 Info Unity 251) Violas Tremolo prog:44 bank:30
2024/01/10 11:45:33.584 30317 30362 Info Unity 252) Violas Pizzicato prog:45 bank:30
2024/01/10 11:45:33.618 30317 30362 Info Unity 253) Violas Fast prog:48 bank:30
2024/01/10 11:45:33.651 30317 30362 Info Unity 254) Violas Slow prog:49 bank:30
2024/01/10 11:45:33.685 30317 30362 Info Unity 255) Violas Trem Expr. prog:44 bank:31
2024/01/10 11:45:33.718 30317 30362 Info Unity 256) Violas Fast Expr. prog:48 bank:31
2024/01/10 11:45:33.752 30317 30362 Info Unity 257) Violas Slow Expr. prog:49 bank:31
2024/01/10 11:45:33.785 30317 30362 Info Unity 258) Celli Tremolo prog:44 bank:40
2024/01/10 11:45:33.818 30317 30362 Info Unity 259) Celli Pizzicato prog:45 bank:40
2024/01/10 11:45:33.852 30317 30362 Info Unity 260) Celli Fast prog:48 bank:40
2024/01/10 11:45:33.885 30317 30362 Info Unity 261) Celli Slow prog:49 bank:40
2024/01/10 11:45:33.919 30317 30362 Info Unity 262) Celli Trem Expr. prog:44 bank:41
2024/01/10 11:45:33.952 30317 30362 Info Unity 263) Celli Fast Expr. prog:48 bank:41
2024/01/10 11:45:33.986 30317 30362 Info Unity 264) Celli Slow Expr. prog:49 bank:41
2024/01/10 11:45:34.019 30317 30362 Info Unity 265) Basses Tremolo prog:44 bank:50
2024/01/10 11:45:34.052 30317 30362 Info Unity 266) Basses Pizzicato prog:45 bank:50
2024/01/10 11:45:34.086 30317 30362 Info Unity 267) Basses Fast prog:48 bank:50
2024/01/10 11:45:34.119 30317 30362 Info Unity 268) Basses Slow prog:49 bank:50
2024/01/10 11:45:34.153 30317 30362 Info Unity 269) Basses Trem Expr. prog:44 bank:51
2024/01/10 11:45:34.186 30317 30362 Info Unity 270) Basses Fast Expr. prog:48 bank:51
2024/01/10 11:45:34.220 30317 30362 Info Unity 271) Basses Slow Expr. prog:49 bank:51
2024/01/10 11:45:34.253 30317 30362 Info Unity 272) Standard prog:0 bank:128
2024/01/10 11:45:34.286 30317 30362 Info Unity 273) Standard 1 prog:1 bank:128
2024/01/10 11:45:34.320 30317 30362 Info Unity 274) Standard 2 prog:2 bank:128
2024/01/10 11:45:34.353 30317 30362 Info Unity 275) Standard 3 prog:3 bank:128
2024/01/10 11:45:34.387 30317 30362 Info Unity 276) Standard 4 prog:4 bank:128
2024/01/10 11:45:34.420 30317 30362 Info Unity 277) Standard 5 prog:5 bank:128
2024/01/10 11:45:34.487 30317 30362 Info Unity 278) Standard 6 prog:6 bank:128
2024/01/10 11:45:34.520 30317 30362 Info Unity 279) Standard 7 prog:7 bank:128
2024/01/10 11:45:34.554 30317 30362 Info Unity 280) Room prog:8 bank:128
2024/01/10 11:45:34.587 30317 30362 Info Unity 281) Room 1 prog:9 bank:128
2024/01/10 11:45:34.621 30317 30362 Info Unity 282) Room 2 prog:10 bank:128
2024/01/10 11:45:34.654 30317 30362 Info Unity 283) Room 3 prog:11 bank:128
2024/01/10 11:45:34.687 30317 30362 Info Unity 284) Room 4 prog:12 bank:128
2024/01/10 11:45:34.721 30317 30362 Info Unity 285) Room 5 prog:13 bank:128
2024/01/10 11:45:34.754 30317 30362 Info Unity 286) Room 6 prog:14 bank:128
2024/01/10 11:45:34.788 30317 30362 Info Unity 287) Room 7 prog:15 bank:128
2024/01/10 11:45:34.821 30317 30362 Info Unity 288) Power prog:16 bank:128
2024/01/10 11:45:34.854 30317 30362 Info Unity 289) Power 1 prog:17 bank:128
2024/01/10 11:45:34.888 30317 30362 Info Unity 290) Power 2 prog:18 bank:128
2024/01/10 11:45:34.921 30317 30362 Info Unity 291) Power 3 prog:19 bank:128
2024/01/10 11:45:34.955 30317 30362 Info Unity 292) Electronic prog:24 bank:128
2024/01/10 11:45:34.988 30317 30362 Info Unity 293) TR-808 prog:25 bank:128
2024/01/10 11:45:35.022 30317 30362 Info Unity 294) Jazz prog:32 bank:128
2024/01/10 11:45:35.055 30317 30362 Info Unity 295) Jazz 1 prog:33 bank:128
2024/01/10 11:45:35.089 30317 30362 Info Unity 296) Jazz 2 prog:34 bank:128
2024/01/10 11:45:35.122 30317 30362 Info Unity 297) Jazz 3 prog:35 bank:128
2024/01/10 11:45:35.155 30317 30362 Info Unity 298) Jazz 4 prog:36 bank:128
2024/01/10 11:45:35.222 30317 30362 Info Unity 299) Brush prog:40 bank:128
2024/01/10 11:45:35.256 30317 30362 Info Unity 300) Brush 1 prog:41 bank:128
2024/01/10 11:45:35.289 30317 30362 Info Unity 301) Brush 2 prog:42 bank:128
2024/01/10 11:45:35.322 30317 30362 Info Unity 302) Orchestra Kit prog:48 bank:128
2024/01/10 11:45:35.356 30317 30362 Info Unity 303) Marching Snare prog:56 bank:128
2024/01/10 11:45:35.389 30317 30362 Info Unity 304) OldMarchingBass prog:57 bank:128
2024/01/10 11:45:35.423 30317 30362 Info Unity 305) Marching Cymbals prog:58 bank:128
2024/01/10 11:45:35.457 30317 30362 Info Unity 306) Marching Bass prog:59 bank:128
2024/01/10 11:45:35.493 30317 30362 Info Unity 307) OldMarchingTenor prog:95 bank:128
2024/01/10 11:45:35.523 30317 30362 Info Unity 308) Marching Tenor prog:96 bank:128
2024/01/10 11:45:35.590 30317 30362 Info Unity
2024/01/10 11:45:35.623 30317 30362 Info Unity Preset list of "/storage/emulated/0/Android/data/com.Csound.CsoundUnity_Development_3_4/files/CsoundFiles/07AcousticGuitar.sf2"
2024/01/10 11:45:35.657 30317 30362 Info Unity 0) Seagul Acoustic Git prog:0 bank:0
2024/01/10 11:45:35.690 30317 30362 Info Unity
2024/01/10 11:45:35.724 30317 30362 Info Unity orch now loaded
2024/01/10 11:45:35.791 30317 30362 Info Unity audio buffered in 2048 sample-frame blocks
2024/01/10 11:45:35.824 30317 30362 Info Unity SECTION 1:
2024/01/10 11:45:35.857 30317 30362 Info Unity new alloc for instr SEQUENCER:
2024/01/10 11:45:35.924 30317 30362 Info Unity new alloc for instr PlayVoice:
2024/01/10 11:45:35.991 30317 30362 Info Unity new alloc for instr PlayVoice:


</details> 

@vlazzarini
Copy link
Member

ok, presets seem to be there ok, so I have to check that the parameters are passed properly from file to memory.
Let me think of something to help debugging.

In any case, we should try focusing on one preset (e.g. the first one) and try to get it to play.

@vlazzarini
Copy link
Member

So here's something to test. Using this code

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

; By  Menno Knevel - 2020

sr = 48000
ksmps = 64
nchnls = 2
0dbfs  = 1



; load soundfonts
isf	sfload	"sf_GMbank.sf2"
	sfpassign	0, isf	


instr SEQUENCER
    kBeat init 0
    kPatch = 0
    kBPM = 60
    kNotes[] fillarray 60, 62, 64, 65, 67, 69, 71, 72    
    
    if metro(kBPM/60) == 1 then
        event "i", "PlayVoice", 0, 0.75, kNotes[kBeat], kPatch
        kBeat = (kBeat < 7 ? kBeat+1 : 0)
        printk2 kBeat
    endif
    printk 0.5,kBeat
endin

instr PlayVoice
iptc    =   p5
inum	=	p4
idur    =   p3
ivel	=	2
kamp	linsegr	1, idur, 1, .1, 0
kamp	= kamp/500000						;scale amplitude
kfreq	=	1						;do not change freq from sf
a1,a2	sfplay3	ivel, inum, kamp*ivel, kfreq, iptc			;preset index = 60
	outs	a1, a2
endin

</CsInstruments>
<CsScore>
f0 z
i"SEQUENCER" 0 z
</CsScore>
</CsoundSynthesizer>

can you test this lib:
csound-android-170124.zip

I have added some tracjing. So now you should get something like this for every note

new alloc for instr PlayVoice:
split: 0, samplebase:0x13020138c freq: 254.471400 orig: 659.255114
	 atten:0.148277 pan:0.500000 mode:1 

It will be interesting to see what gets printed.

@giovannibedetti
Copy link
Author

I see these logs (no tracing), and no output:

Details

2024/01/17 20:21:29.227 14587 14807 Info Unity SECTION 1:
2024/01/17 20:21:29.261 14587 14807 Info Unity new alloc for instr SEQUENCER:
2024/01/17 20:21:29.328 14587 14807 Info Unity i1
2024/01/17 20:21:29.361 14587 14807 Info Unity 1.00000
2024/01/17 20:21:29.394 14587 14807 Info Unity i 1
2024/01/17 20:21:29.428 14587 14807 Info Unity time 0.00000:
2024/01/17 20:21:29.461 14587 14807 Info Unity 1.00000
2024/01/17 20:21:29.495 14587 14807 Info Unity rtevent: T 0.000 TT 0.000 M:
2024/01/17 20:21:29.528 14587 14807 Info Unity 0.00000
2024/01/17 20:21:29.594 14587 14807 Info Unity 0.00000
2024/01/17 20:21:29.628 14587 14807 Info Unity
2024/01/17 20:21:29.661 14587 14807 Info Unity new alloc for instr PlayVoice:
2024/01/17 20:21:29.695 14587 14807 Info Unity i 1
2024/01/17 20:21:29.729 14587 14807 Info Unity time 0.50000:
2024/01/17 20:21:29.762 14587 14807 Info Unity 1.00000
2024/01/17 20:21:29.796 14587 14807 Info Unity i 1
2024/01/17 20:21:29.829 14587 14807 Info Unity time 1.00000:
2024/01/17 20:21:29.896 14587 14807 Info Unity 1.00000
2024/01/17 20:21:29.929 14587 14807 Info Unity i1
2024/01/17 20:21:29.963 14587 14807 Info Unity 2.00000
2024/01/17 20:21:29.996 14587 14807 Info Unity rtevent: T 1.000 TT 1.000 M:
2024/01/17 20:21:30.063 14587 14807 Info Unity 0.00000
2024/01/17 20:21:30.096 14587 14807 Info Unity 0.00000
2024/01/17 20:21:30.130 14587 14807 Info Unity
2024/01/17 20:21:30.196 14587 14807 Info Unity i 1
2024/01/17 20:21:30.230 14587 14807 Info Unity time 1.50000:
2024/01/17 20:21:30.297 14587 14807 Info Unity 2.00000
2024/01/17 20:21:30.598 14587 14807 Info Unity i 1
2024/01/17 20:21:30.631 14587 14807 Info Unity time 2.00000:
2024/01/17 20:21:30.665 14587 14807 Info Unity 2.00000
2024/01/17 20:21:30.698 14587 14807 Info Unity i1
2024/01/17 20:21:30.731 14587 14807 Info Unity 3.00000
2024/01/17 20:21:30.798 14587 14807 Info Unity rtevent: T 2.000 TT 2.000 M:
2024/01/17 20:21:30.832 14587 14807 Info Unity 0.00000
2024/01/17 20:21:30.899 14587 14807 Info Unity 0.00000

@vlazzarini
Copy link
Member

ok, then it does not look like the code is actually reaching the place where the soundfont data is read (assuming the Csound library is the one I sent you, could you check the build version and date? It should be 6.19 beta from today).

@giovannibedetti
Copy link
Author

You're right, it is still version 6.18. I'm not sure what I did wrong, I will try to reimport the libs in a few minutes.

Logs

2024/01/18 10:10:55.000 12082 12209 Info Unity CsoundUnity Awake
2024/01/18 10:10:55.000 12082 12209 Info Unity AudioSettings.bufferSize: 1024 numBuffers: 4
2024/01/18 10:10:55.026 12082 12209 Info Unity Setting SFDIR for Android to: /storage/emulated/0/Android/data/com.Csound.CsoundUnity_Development_3_4/files/CsoundFiles
2024/01/18 10:10:55.051 12082 12082 Warn UnityMain type=1400 audit(0.0:42037): avc: denied { read } for name="/" dev="dm-16" ino=2 scontext=u:r:untrusted_app_32:s0:c177,c257,c512,c768 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0 app=com.Csound.CsoundUnity_Development_3_4
2024/01/18 10:10:55.501 12082 12209 Info Unity Csound created and started.
2024/01/18 10:10:55.501 12082 12209 Info Unity AudioSettings.outputSampleRate: 48000
2024/01/18 10:10:55.501 12082 12209 Info Unity GetSr: 48000
2024/01/18 10:10:55.501 12082 12209 Info Unity GetKr: 48000
2024/01/18 10:10:55.501 12082 12209 Info Unity Get0dbfs: 1
2024/01/18 10:10:55.501 12082 12209 Info Unity GetKsmps: 1
2024/01/18 10:10:55.506 12082 12209 Info Unity instr SEQUENCER uses instrument number 1
2024/01/18 10:10:55.506 12082 12209 Info Unity Csound zerdbfs: 1
2024/01/18 10:10:55.507 12082 12209 Info Unity CsoundUnity done init, compiledOk? True
2024/01/18 10:10:55.511 12082 12209 Info Unity Csound version: 6180, API Version: 400
2024/01/18 10:10:55.765 12082 12209 Info Unity instr PlayVoice uses instrument number 2
2024/01/18 10:10:55.766 12082 12209 Info Unity --Csound version 6.18 (float samples) Oct 27 2022
2024/01/18 10:10:55.766 12082 12209 Info Unity [commit: GIT_HASH_VALUE]
2024/01/18 10:10:55.821 12082 12209 Info Unity libsndfile-1.0.25
2024/01/18 10:10:55.852 12082 12209 Info Unity displays suppressed
2024/01/18 10:10:55.883 12082 12209 Info Unity sr = 48000.0,
2024/01/18 10:10:55.915 12082 12209 Info Unity kr = 48000.000,
2024/01/18 10:10:55.948 12082 12209 Info Unity ksmps = 1
2024/01/18 10:10:55.980 12082 12209 Info Unity 0dBFS level = 1.0,
2024/01/18 10:10:56.014 12082 12209 Info Unity A4 tuning = 440.0
2024/01/18 10:10:56.050 12082 12209 Info Unity orch now loaded
2024/01/18 10:10:56.084 12082 12209 Info Unity audio buffered in 2048 sample-frame blocks
2024/01/18 10:10:56.119 12082 12209 Info Unity SECTION 1:
2024/01/18 10:10:56.153 12082 12209 Info Unity new alloc for instr SEQUENCER:
2024/01/18 10:10:56.220 12082 12209 Info Unity i1

@giovannibedetti
Copy link
Author

Ok I found the reason, I'm sorry for this! I was compiling against ARM7, and my ARM64 phone wasn't complaining. So all the tests above are to be considered void.
Testing now!

@giovannibedetti
Copy link
Author

giovannibedetti commented Jan 18, 2024

Ok, now I'm using the right version:

2024/01/18 10:22:46.078 13061 13122 Info Unity Csound version: 6190, API Version: 400
2024/01/18 10:22:46.219 13061 13122 Info Unity --Csound version 6.19 (float samples) Jan 17 2024

but still I don't hear anything, and no further info from the logs. I'm using the last csd you posted.

Details

2024/01/18 10:26:38.360 13955 14001 Info Unity orch now loaded
2024/01/18 10:26:38.360 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:38.360 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:38.360 13955 14001 Info Unity
2024/01/18 10:26:38.393 13955 14001 Info Unity audio buffered in 2048 sample-frame blocks
2024/01/18 10:26:38.393 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:38.393 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:38.393 13955 14001 Info Unity
2024/01/18 10:26:38.460 13955 14001 Info Unity SECTION 1:
2024/01/18 10:26:38.460 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:38.460 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:38.460 13955 14001 Info Unity
2024/01/18 10:26:38.493 13955 14001 Info Unity new alloc for instr SEQUENCER:
2024/01/18 10:26:38.493 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:38.493 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:38.493 13955 14001 Info Unity
2024/01/18 10:26:38.527 13955 14001 Info Unity i1
2024/01/18 10:26:38.527 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:38.527 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:38.527 13955 14001 Info Unity
2024/01/18 10:26:38.560 13955 14001 Info Unity 1.00000
2024/01/18 10:26:38.560 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:38.560 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:38.560 13955 14001 Info Unity
2024/01/18 10:26:38.594 13955 14001 Info Unity i 1
2024/01/18 10:26:38.594 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:38.594 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:38.594 13955 14001 Info Unity
2024/01/18 10:26:38.627 13955 14001 Info Unity time 0.00000:
2024/01/18 10:26:38.627 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:38.627 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:38.627 13955 14001 Info Unity
2024/01/18 10:26:38.660 13955 14001 Info Unity 1.00000
2024/01/18 10:26:38.660 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:38.660 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:38.660 13955 14001 Info Unity
2024/01/18 10:26:38.694 13955 14001 Info Unity rtevent: T 0.000 TT 0.000 M:
2024/01/18 10:26:38.694 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:38.694 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:38.694 13955 14001 Info Unity
2024/01/18 10:26:38.761 13955 14001 Info Unity 0.00000
2024/01/18 10:26:38.761 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:38.761 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:38.761 13955 14001 Info Unity
2024/01/18 10:26:38.794 13955 14001 Info Unity 0.00000
2024/01/18 10:26:38.794 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:38.794 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:38.794 13955 14001 Info Unity
2024/01/18 10:26:38.828 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:38.828 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:38.828 13955 14001 Info Unity
2024/01/18 10:26:38.861 13955 14001 Info Unity new alloc for instr PlayVoice:
2024/01/18 10:26:38.861 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:38.861 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:38.861 13955 14001 Info Unity
2024/01/18 10:26:38.928 13955 14001 Info Unity i 1
2024/01/18 10:26:38.928 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:38.928 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:38.928 13955 14001 Info Unity
2024/01/18 10:26:38.961 13955 14001 Info Unity time 0.50000:
2024/01/18 10:26:38.961 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:38.961 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:38.961 13955 14001 Info Unity
2024/01/18 10:26:38.994 13955 14001 Info Unity 1.00000
2024/01/18 10:26:38.994 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:38.994 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:38.994 13955 14001 Info Unity
2024/01/18 10:26:39.028 13955 14001 Info Unity i 1
2024/01/18 10:26:39.028 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:39.028 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:39.028 13955 14001 Info Unity
2024/01/18 10:26:39.061 13955 14001 Info Unity time 1.00000:
2024/01/18 10:26:39.061 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:39.061 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:39.061 13955 14001 Info Unity
2024/01/18 10:26:39.094 13955 14001 Info Unity 1.00000
2024/01/18 10:26:39.094 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:39.094 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:39.094 13955 14001 Info Unity
2024/01/18 10:26:39.162 13955 14001 Info Unity i1
2024/01/18 10:26:39.162 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:39.162 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:39.162 13955 14001 Info Unity
2024/01/18 10:26:39.195 13955 14001 Info Unity 2.00000
2024/01/18 10:26:39.195 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:39.195 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:39.195 13955 14001 Info Unity
2024/01/18 10:26:39.229 13955 14001 Info Unity rtevent: T 1.000 TT 1.000 M:
2024/01/18 10:26:39.229 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:39.229 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:39.229 13955 14001 Info Unity
2024/01/18 10:26:39.295 13955 14001 Info Unity 0.00000
2024/01/18 10:26:39.295 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:39.295 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:39.295 13955 14001 Info Unity
2024/01/18 10:26:39.329 13955 14001 Info Unity 0.00000
2024/01/18 10:26:39.329 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:39.329 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:39.329 13955 14001 Info Unity
2024/01/18 10:26:39.395 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:39.395 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:39.395 13955 14001 Info Unity
2024/01/18 10:26:39.497 13955 14001 Info Unity i 1
2024/01/18 10:26:39.497 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:39.497 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:39.497 13955 14001 Info Unity
2024/01/18 10:26:39.529 13955 14001 Info Unity time 1.50000:
2024/01/18 10:26:39.529 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:39.529 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:39.529 13955 14001 Info Unity
2024/01/18 10:26:39.596 13955 14001 Info Unity 2.00000
2024/01/18 10:26:39.596 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:39.596 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:39.596 13955 14001 Info Unity
2024/01/18 10:26:39.999 13955 14001 Info Unity i 1
2024/01/18 10:26:39.999 13955 14001 Info Unity d__160:MoveNext()
2024/01/18 10:26:39.999 13955 14001 Info Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2024/01/18 10:26:39.999 13955 14001 Info Unity
2024/01/18 10:26:40.031 13955 14001 Info Unity time 2.00000:

@giovannibedetti
Copy link
Author

So I tested again the csd that has the channel to change presets, and all is working as expected! I also have the expected logs now:

Details

2024/01/18 10:36:39.299 14665 14689 Info Unity split: 0, samplebase:0xb4000074b739a5b8 freq: 261.625580 orig: 261.625580
2024/01/18 10:36:39.299 14665 14689 Info Unity atten:0.023624 pan:0.512000 mode:1
2024/01/18 10:36:39.333 14665 14689 Info Unity split: 1, samplebase:0xb4000074b74378aa freq: 261.625580 orig: 261.625580
2024/01/18 10:36:39.333 14665 14689 Info Unity atten:0.023624 pan:1.000000 mode:1
2024/01/18 10:36:39.366 14665 14689 Info Unity split: 2, samplebase:0xb4000074b739a5b8 freq: 261.625580 orig: 261.625580
2024/01/18 10:36:39.366 14665 14689 Info Unity atten:0.003720 pan:0.512000 mode:1
2024/01/18 10:36:39.400 14665 14689 Info Unity split: 3, samplebase:0xb4000074b74378aa freq: 261.625580 orig: 261.625580
2024/01/18 10:36:39.400 14665 14689 Info Unity atten:0.003720 pan:1.000000 mode:1
2024/01/18 10:36:39.433 14665 14689 Info Unity new alloc for instr PlayVoice:
2024/01/18 10:36:39.467 14665 14689 Info Unity split: 0, samplebase:0xb4000074b74d4b9c freq: 293.664764 orig: 293.664764
2024/01/18 10:36:39.467 14665 14689 Info Unity atten:0.032271 pan:0.512000 mode:1
2024/01/18 10:36:39.500 14665 14689 Info Unity split: 1, samplebase:0xb4000074b759afb0 freq: 293.664764 orig: 293.664764
2024/01/18 10:36:39.500 14665 14689 Info Unity atten:0.032271 pan:1.000000 mode:1
2024/01/18 10:36:39.533 14665 14689 Info Unity split: 2, samplebase:0xb4000074b74d4b9c freq: 293.664764 orig: 293.664764
2024/01/18 10:36:39.533 14665 14689 Info Unity atten:0.005082 pan:0.512000 mode:1
2024/01/18 10:36:39.567 14665 14689 Info Unity split: 3, samplebase:0xb4000074b759afb0 freq: 293.664764 orig: 293.664764
2024/01/18 10:36:39.567 14665 14689 Info Unity atten:0.005082 pan:1.000000 mode:1
2024/01/18 10:36:39.601 14665 14689 Info Unity split: 0, samplebase:0xb4000074b76613c4 freq: 329.627563 orig: 329.627563
2024/01/18 10:36:39.601 14665 14689 Info Unity atten:0.016704 pan:0.512000 mode:1
2024/01/18 10:36:39.634 14665 14689 Info Unity split: 1, samplebase:0xb4000074b7716f46 freq: 329.627563 orig: 329.627563
2024/01/18 10:36:39.634 14665 14689 Info Unity atten:0.016704 pan:1.000000 mode:1
2024/01/18 10:36:39.667 14665 14689 Info Unity split: 2, samplebase:0xb4000074b76613c4 freq: 329.627563 orig: 329.627563
2024/01/18 10:36:39.667 14665 14689 Info Unity atten:0.002631 pan:0.512000 mode:1
2024/01/18 10:36:39.700 14665 14689 Info Unity split: 3, samplebase:0xb4000074b7716f46 freq: 329.627563 orig: 329.627563
2024/01/18 10:36:39.700 14665 14689 Info Unity atten:0.002631 pan:1.000000 mode:1
2024/01/18 10:36:39.734 14665 14689 Info Unity split: 0, samplebase:0xb4000074b76613c4 freq: 349.228238 orig: 329.627563
2024/01/18 10:36:39.734 14665 14689 Info Unity atten:0.016704 pan:0.512000 mode:1
2024/01/18 10:36:39.766 14665 14689 Info Unity split: 1, samplebase:0xb4000074b7716f46 freq: 349.228238 orig: 329.627563
2024/01/18 10:36:39.766 14665 14689 Info Unity atten:0.016704 pan:1.000000 mode:1
2024/01/18 10:36:39.800 14665 14689 Info Unity split: 2, samplebase:0xb4000074b76613c4 freq: 349.228238 orig: 329.627563
2024/01/18 10:36:39.800 14665 14689 Info Unity atten:0.002631 pan:0.512000 mode:1
2024/01/18 10:36:39.833 14665 14689 Info Unity split: 3, samplebase:0xb4000074b7716f46 freq: 349.228238 orig: 329.627563
2024/01/18 10:36:39.833 14665 14689 Info Unity atten:0.002631 pan:1.000000 mode:1
2024/01/18 10:36:39.867 14665 14689 Info Unity split: 0, samplebase:0xb4000074b77ccac8 freq: 391.995422 orig: 391.995422
2024/01/18 10:36:39.867 14665 14689 Info Unity atten:0.018750 pan:0.512000 mode:1
2024/01/18 10:36:39.900 14665 14689 Info Unity split: 1, samplebase:0xb4000074b786c420 freq: 391.995422 orig: 391.995422
2024/01/18 10:36:39.900 14665 14689 Info Unity atten:0.018750 pan:1.000000 mode:1
2024/01/18 10:36:39.934 14665 14689 Info Unity split: 2, samplebase:0xb4000074b77ccac8 freq: 391.995422 orig: 391.995422
2024/01/18 10:36:39.934 14665 14689 Info Unity atten:0.002953 pan:0.512000 mode:1
2024/01/18 10:36:39.967 14665 14689 Info Unity split: 3, samplebase:0xb4000074b786c420 freq: 391.995422 orig: 391.995422
2024/01/18 10:36:39.967 14665 14689 Info Unity atten:0.002953 pan:1.000000 mode:1
2024/01/18 10:36:40.001 14665 14689 Info Unity split: 0, samplebase:0xb4000074b790bd78 freq: 440.000000 orig: 440.000000
2024/01/18 10:36:40.001 14665 14689 Info Unity atten:0.014882 pan:0.512000 mode:1
2024/01/18 10:36:40.034 14665 14689 Info Unity split: 1, samplebase:0xb4000074b799a950 freq: 440.000000 orig: 440.000000
2024/01/18 10:36:40.034 14665 14689 Info Unity atten:0.014882 pan:1.000000 mode:1
2024/01/18 10:36:40.067 14665 14689 Info Unity split: 2, samplebase:0xb4000074b790bd78 freq: 440.000000 orig: 440.000000
2024/01/18 10:36:40.067 14665 14689 Info Unity atten:0.002344 pan:0.512000 mode:1
2024/01/18 10:36:40.101 14665 14689 Info Unity split: 3, samplebase:0xb4000074b799a950 freq: 440.000000 orig: 440.000000
2024/01/18 10:36:40.101 14665 14689 Info Unity atten:0.002344 pan:1.000000 mode:1
2024/01/18 10:36:40.134 14665 14689 Info Unity split: 0, samplebase:0xb4000074b7a29528 freq: 493.883301 orig: 493.883301
2024/01/18 10:36:40.134 14665 14689 Info Unity atten:0.025028 pan:0.512000 mode:1
2024/01/18 10:36:40.168 14665 14689 Info Unity split: 1, samplebase:0xb4000074b7a9fdde freq: 493.883301 orig: 493.883301
2024/01/18 10:36:40.168 14665 14689 Info Unity atten:0.025028 pan:1.000000 mode:1
2024/01/18 10:36:40.201 14665 14689 Info Unity split: 2, samplebase:0xb4000074b7a29528 freq: 493.883301 orig: 493.883301
2024/01/18 10:36:40.201 14665 14689 Info Unity atten:0.003942 pan:0.512000 mode:1
2024/01/18 10:36:40.235 14665 14689 Info Unity split: 3, samplebase:0xb4000074b7a9fdde freq: 493.883301 orig: 493.883301
2024/01/18 10:36:40.235 14665 14689 Info Unity atten:0.003942 pan:1.000000 mode:1
2024/01/18 10:36:40.268 14665 14689 Info Unity split: 0, samplebase:0xb4000074b7b16694 freq: 523.251160 orig: 523.251160
2024/01/18 10:36:40.268 14665 14689 Info Unity atten:0.029764 pan:0.512000 mode:1
2024/01/18 10:36:40.301 14665 14689 Info Unity split: 1, samplebase:0xb4000074b7b73808 freq: 523.251160 orig: 523.251160
2024/01/18 10:36:40.301 14665 14689 Info Unity atten:0.029764 pan:1.000000 mode:1
2024/01/18 10:36:40.335 14665 14689 Info Unity split: 2, samplebase:0xb4000074b7b16694 freq: 523.251160 orig: 523.251160
2024/01/18 10:36:40.335 14665 14689 Info Unity atten:0.004687 pan:0.512000 mode:1
2024/01/18 10:36:40.368 14665 14689 Info Unity split: 3, samplebase:0xb4000074b7b73808 freq: 523.251160 orig: 523.251160
2024/01/18 10:36:40.368 14665 14689 Info Unity atten:0.004687 pan:1.000000 mode:1
2024/01/18 10:36:40.402 14665 14689 Info Unity split: 0, samplebase:0xb4000074b739a5b8 freq: 261.625580 orig: 261.625580
2024/01/18 10:36:40.402 14665 14689 Info Unity atten:0.023624 pan:0.512000 mode:1
2024/01/18 10:36:40.435 14665 14689 Info Unity split: 1, samplebase:0xb4000074b74378aa freq: 261.625580 orig: 261.625580
2024/01/18 10:36:40.435 14665 14689 Info Unity atten:0.023624 pan:1.000000 mode:1
2024/01/18 10:36:40.469 14665 14689 Info Unity split: 2, samplebase:0xb4000074b739a5b8 freq: 261.625580 orig: 261.625580
2024/01/18 10:36:40.469 14665 14689 Info Unity atten:0.003720 pan:0.512000 mode:1
2024/01/18 10:36:40.502 14665 14689 Info Unity split: 3, samplebase:0xb4000074b74378aa freq: 261.625580 orig: 261.625580
2024/01/18 10:36:40.502 14665 14689 Info Unity atten:0.003720 pan:1.000000 mode:1
2024/01/18 10:36:40.536 14665 14689 Info Unity split: 0, samplebase:0xb4000074b74d4b9c freq: 293.664764 orig: 293.664764
2024/01/18 10:36:40.536 14665 14689 Info Unity atten:0.032271 pan:0.512000 mode:1
2024/01/18 10:36:40.569 14665 14689 Info Unity split: 1, samplebase:0xb4000074b759afb0 freq: 293.664764 orig: 293.664764
2024/01/18 10:36:40.569 14665 14689 Info Unity atten:0.032271 pan:1.000000 mode:1
2024/01/18 10:36:40.603 14665 14689 Info Unity split: 2, samplebase:0xb4000074b74d4b9c freq: 293.664764 orig: 293.664764
2024/01/18 10:36:40.603 14665 14689 Info Unity atten:0.005082 pan:0.512000 mode:1
2024/01/18 10:36:40.636 14665 14689 Info Unity split: 3, samplebase:0xb4000074b759afb0 freq: 293.664764 orig: 293.664764
2024/01/18 10:36:40.636 14665 14689 Info Unity atten:0.005082 pan:1.000000 mode:1
2024/01/18 10:36:40.669 14665 14689 Info Unity split: 0, samplebase:0xb4000074b76613c4 freq: 329.627563 orig: 329.627563
2024/01/18 10:36:40.669 14665 14689 Info Unity atten:0.016704 pan:0.512000 mode:1
2024/01/18 10:36:40.703 14665 14689 Info Unity split: 1, samplebase:0xb4000074b7716f46 freq: 329.627563 orig: 329.627563
2024/01/18 10:36:40.703 14665 14689 Info Unity atten:0.016704 pan:1.000000 mode:1
2024/01/18 10:36:40.736 14665 14689 Info Unity split: 2, samplebase:0xb4000074b76613c4 freq: 329.627563 orig: 329.627563
2024/01/18 10:36:40.736 14665 14689 Info Unity atten:0.002631 pan:0.512000 mode:1
2024/01/18 10:36:40.771 14665 14689 Info Unity split: 3, samplebase:0xb4000074b7716f46 freq: 329.627563 orig: 329.627563
2024/01/18 10:36:40.771 14665 14689 Info Unity atten:0.002631 pan:1.000000 mode:1
2024/01/18 10:36:40.803 14665 14689 Info Unity split: 0, samplebase:0xb4000074b76613c4 freq: 349.228238 orig: 329.627563
2024/01/18 10:36:40.803 14665 14689 Info Unity atten:0.016704 pan:0.512000 mode:1
2024/01/18 10:36:40.837 14665 14689 Info Unity split: 1, samplebase:0xb4000074b7716f46 freq: 349.228238 orig: 329.627563
2024/01/18 10:36:40.837 14665 14689 Info Unity atten:0.016704 pan:1.000000 mode:1
2024/01/18 10:36:40.870 14665 14689 Info Unity split: 2, samplebase:0xb4000074b76613c4 freq: 349.228238 orig: 329.627563
2024/01/18 10:36:40.870 14665 14689 Info Unity atten:0.002631 pan:0.512000 mode:1
2024/01/18 10:36:40.903 14665 14689 Info Unity split: 3, samplebase:0xb4000074b7716f46 freq: 349.228238 orig: 329.627563
2024/01/18 10:36:40.903 14665 14689 Info Unity atten:0.002631 pan:1.000000 mode:1
2024/01/18 10:36:40.939 14665 14689 Info Unity split: 0, samplebase:0xb4000074b76613c4 freq: 391.995444 orig: 329.627563
2024/01/18 10:36:40.939 14665 14689 Info Unity atten:0.016704 pan:0.512000 mode:1
2024/01/18 10:36:40.970 14665 14689 Info Unity split: 1, samplebase:0xb4000074b7716f46 freq: 391.995444 orig: 329.627563
2024/01/18 10:36:40.970 14665 14689 Info Unity atten:0.016704 pan:1.000000 mode:1
2024/01/18 10:36:41.004 14665 14689 Info Unity split: 2, samplebase:0xb4000074b76613c4 freq: 391.995444 orig: 329.627563
2024/01/18 10:36:41.004 14665 14689 Info Unity atten:0.002631 pan:0.512000 mode:1
2024/01/18 10:36:41.037 14665 14689 Info Unity split: 3, samplebase:0xb4000074b7716f46 freq: 391.995444 orig: 329.627563
2024/01/18 10:36:41.037 14665 14689 Info Unity atten:0.002631 pan:1.000000 mode:1
2024/01/18 10:36:41.071 14665 14689 Info Unity split: 0, samplebase:0xb4000074b77ccac8 freq: 439.999985 orig: 391.995422
2024/01/18 10:36:41.071 14665 14689 Info Unity atten:0.018750 pan:0.512000 mode:1
2024/01/18 10:36:41.104 14665 14689 Info Unity split: 1, samplebase:0xb4000074b786c420 freq: 439.999985 orig: 391.995422
2024/01/18 10:36:41.104 14665 14689 Info Unity atten:0.018750 pan:1.000000 mode:1
2024/01/18 10:36:41.137 14665 14689 Info Unity split: 2, samplebase:0xb4000074b77ccac8 freq: 439.999985 orig: 391.995422
2024/01/18 10:36:41.137 14665 14689 Info Unity atten:0.002953 pan:0.512000 mode:1
2024/01/18 10:36:41.171 14665 14689 Info Unity split: 3, samplebase:0xb4000074b786c420 freq: 439.999985 orig: 391.995422
2024/01/18 10:36:41.171 14665 14689 Info Unity atten:0.002953 pan:1.000000 mode:1
2024/01/18 10:36:41.204 14665 14689 Info Unity split: 0, samplebase:0xb4000074b790bd78 freq: 493.883301 orig: 440.000000
2024/01/18 10:36:41.204 14665 14689 Info Unity atten:0.014882 pan:0.512000 mode:1
2024/01/18 10:36:41.238 14665 14689 Info Unity split: 1, samplebase:0xb4000074b799a950 freq: 493.883301 orig: 440.000000
2024/01/18 10:36:41.238 14665 14689 Info Unity atten:0.014882 pan:1.000000 mode:1
2024/01/18 10:36:41.272 14665 14689 Info Unity split: 2, samplebase:0xb4000074b790bd78 freq: 493.883301 orig: 440.000000
2024/01/18 10:36:41.272 14665 14689 Info Unity atten:0.002344 pan:0.512000 mode:1
2024/01/18 10:36:41.305 14665 14689 Info Unity split: 3, samplebase:0xb4000074b799a950 freq: 493.883301 orig: 440.000000
2024/01/18 10:36:41.305 14665 14689 Info Unity atten:0.002344 pan:1.000000 mode:1
2024/01/18 10:36:41.339 14665 14689 Info Unity split: 0, samplebase:0xb4000074b7a29528 freq: 523.251130 orig: 493.883301
2024/01/18 10:36:41.339 14665 14689 Info Unity atten:0.025028 pan:0.512000 mode:1
2024/01/18 10:36:41.372 14665 14689 Info Unity split: 1, samplebase:0xb4000074b7a9fdde freq: 523.251130 orig: 493.883301
2024/01/18 10:36:41.372 14665 14689 Info Unity atten:0.025028 pan:1.000000 mode:1
2024/01/18 10:36:41.406 14665 14689 Info Unity split: 2, samplebase:0xb4000074b7a29528 freq: 523.251130 orig: 493.883301
2024/01/18 10:36:41.406 14665 14689 Info Unity atten:0.003942 pan:0.512000 mode:1
2024/01/18 10:36:41.439 14665 14689 Info Unity split: 3, samplebase:0xb4000074b7a9fdde freq: 523.251130 orig: 493.883301
2024/01/18 10:36:41.439 14665 14689 Info Unity atten:0.003942 pan:1.000000 mode:1
2024/01/18 10:36:41.473 14665 14689 Info Unity split: 0, samplebase:0xb4000074b707e8b4 freq: 261.625565 orig: 220.000000
2024/01/18 10:36:41.473 14665 14689 Info Unity atten:0.021046 pan:0.512000 mode:1
2024/01/18 10:36:41.506 14665 14689 Info Unity split: 1, samplebase:0xb4000074b715eb30 freq: 261.625565 orig: 220.000000
2024/01/18 10:36:41.506 14665 14689 Info Unity atten:0.021046 pan:1.000000 mode:1
2024/01/18 10:36:41.541 14665 14689 Info Unity split: 2, samplebase:0xb4000074b707e8b4 freq: 261.625565 orig: 220.000000
2024/01/18 10:36:41.541 14665 14689 Info Unity atten:0.003315 pan:0.512000 mode:1
2024/01/18 10:36:41.573 14665 14689 Info Unity split: 3, samplebase:0xb4000074b715eb30 freq: 261.625565 orig: 220.000000
2024/01/18 10:36:41.573 14665 14689 Info Unity atten:0.003315 pan:1.000000 mode:1
2024/01/18 10:36:41.606 14665 14689 Info Unity split: 0, samplebase:0xb4000074b0b8fdc8 freq: 293.664758 orig: 391.995422
2024/01/18 10:36:41.606 14665 14689 Info Unity atten:0.300000 pan:0.500000 mode:1
2024/01/18 10:36:41.639 14665 14689 Info Unity rtevent: T 8.308 TT 8.308 M:
2024/01/18 10:36:41.706 14665 14689 Info Unity 1.37470
2024/01/18 10:36:41.806 14665 14689 Info Unity number of samples out of range:
2024/01/18 10:36:41.839 14665 14689 Info Unity 96
2024/01/18 10:36:41.873 14665 14689 Info Unity 98
2024/01/18 10:36:41.940 14665 14689 Info Unity split: 0, samplebase:0xb4000074b0b8fdc8 freq: 329.627545 orig: 391.995422
2024/01/18 10:36:41.940 14665 14689 Info Unity atten:0.300000 pan:0.500000 mode:1
2024/01/18 10:36:41.973 14665 14689 Info Unity rtevent: T 8.769 TT 8.769 M:
2024/01/18 10:36:42.006 14665 14689 Info Unity 1.40432
2024/01/18 10:36:42.040 14665 14689 Info Unity 1.40432

So it looks like it is fixed! I will do some more testing, and I will try to understand why the other csd is not producing any output.
Thanks for now!

@vlazzarini
Copy link
Member

Thanks. Two things:
(1) I've prepared a new lib:
csound-android-180124.zip
with more tracing.. This should print something like

new alloc for instr PlayVoice:
sfplay: 1 layers in preset 0-Piano 1
layer: 0, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 0 maxmote: 127 
split: 0, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 0 maxmote: 29 
split: 1, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 30 maxmote: 35 
split: 2, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 36 maxmote: 38 
split: 3, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 39 maxmote: 43 
split: 4, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 44 maxmote: 44 
split: 5, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 45 maxmote: 50 
split: 6, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 51 maxmote: 51 
split: 7, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 52 maxmote: 55 
split: 8, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 56 maxmote: 57 
split: 9, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 58 maxmote: 62 
play: split 9, samplebase:0x15020138c freq: 254.471400 orig: 659.255114
	 atten:0.148277 pan:0.500000 mode:1 
split: 10, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 63 maxmote: 64 
split: 11, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 65 maxmote: 67 
split: 12, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 68 maxmote: 69 
split: 13, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 70 maxmote: 70 
split: 14, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 71 maxmote: 74 
split: 15, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 75 maxmote: 80 
split: 16, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 81 maxmote: 83 
split: 17, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 84 maxmote: 86 
split: 18, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 87 maxmote: 89 
split: 19, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 90 maxmote: 93 
split: 20, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 94 maxmote: 99 
split: 21, vel:100 minvel: 0 maxvel: 127
	 note: 60 minnote: 100 maxmote: 108 
....

For each note. The first line reporting about layers in preset will always print as this is seen at the top of sfplay3 init function.

(2) In the example code I had

ivel = 2

bring this to 100, so it doesn't interfere.

@vlazzarini
Copy link
Member

vlazzarini commented Jan 18, 2024

Oh great, I prepared a new lib with more tracing (above) before I knew you had it running.
Could you make sure the other sf files also work and that there is no pitch issues? The tracing also should help if there is any.

Also: could you report back what you change to make it work? So we know and if there is anything to be fixed, we can do it?

vlazzarini pushed a commit that referenced this issue Jan 18, 2024
@giovannibedetti
Copy link
Author

giovannibedetti commented Jan 18, 2024

This csd has a velocity of 2 that is too low to hear anything (as you already noted). Setting it to a higher value makes it work as expected.

The other thing I had to do is switch to IL2CPP as scripting backend (instead of using Mono) to be able to export for ARM64 devices and use the correct lib you sent (otherwise by default Unity for Android exports ARM7 builds, so it was using the 6.18 version dated 27oct 2022)

I will do some more tests with different sound fonts later and report back here

@vlazzarini
Copy link
Member

it's true about the vel of 2, I was messing with it and copied the code by mistake. OTOH I think that works on the desktop.

@giovannibedetti
Copy link
Author

giovannibedetti commented Jan 18, 2024

I have tested several sound fonts, all looks good. Thanks for the fix, lots of people will be happy about this!
It would be nice to build the libs for all architectures:
armeabi-v7a
arm64-v8a
x86
x86_64

csound\Android\CsoundAndroid\jni\Application.mk should be

APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
APP_CPPFLAGS += -fexceptions -frtti
APP_OPTIM := release
APP_PLATFORM := android-21
#APP_STL := gnustl_shared
#NDK_TOOLCHAIN_VERSION := 4.9
APP_STL := c++_shared
NDK_TOOLCHAIN_VERSION := clang

@vlazzarini
Copy link
Member

vlazzarini commented Jan 18, 2024

I can do that. I think I actually have all of these, not sure of x86. I'll post it here.

I think my original hunch about signed/unsigned discrepancies was correct.

@vlazzarini
Copy link
Member

Here is the Android release package with these fixes
csound-android-6.19.0-beta.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants