| Author |
|
Dizzy
Psycler

Date Registered: 07.2007
Location:
Posts: 6
 |
|
Problem with Sublime |  |
A strange problem that I've seen with several versions of Psycle. Latest tested with 1.8.3 beta (8-May-2007 build), as I haven't been able to run the latest release candidate.
The Sublime generator otherwise works normally, but rendering to wav gives a very distorted result. Other generators work both interactively and when rendered.
Any ideas?
|
|
12.08.2007, 01:26 |
|
[JAZ]
Psycle Developer

Date Registered: 11.2001
Location: Balaguer (Spain)
Posts: 1238
![[JAZ] ist offline](images/offline.gif) |
|
|
I got once a reporting about a quite similar problem, I don't remember if it was sublime or another native.
For me, it seems to be working (at least i've rendered a song of mine with no problems whatsoever).
Are you sure it is sublime, and not another effect? If you could try rendering the song, with sublimes connected directly to master to verify, that would help.
And if it is consistent (you can repeat it), sending me the .psy could help me locate the problem.
Btw: Did you try the SSE build (instead of the SSE2 one)?? That one should work, for most of today's processors.
__________________ <[JAZ]> Pa pi pa pa pa pi pa.... ;·D
|
|
12.08.2007, 15:12 |
|
MfM
Psycler

Date Registered: 08.2003
Location: catania-ITALY
Posts: 606
 |
|
|
hello dizzy,you have the nick name of one of the greatest musician of the scene "Juha Kujanpää" do you know?or maybe are you him ?
__________________ www.track3z.net
|
|
12.08.2007, 20:41 |
|
Dizzy
Psycler

Date Registered: 07.2007
Location:
Posts: 6
 |
|
|
[JaZ]: It is repeatable (at least on my machine), and it doesn't happen with other generators. I put together a simple example including a rendered wav:
http://rapidshare.com/files/48591603/sublime_test.zip.html
I haven't been able to get the latest 1.8.5 RC up and running even using the SSE fix, due to the unfortunate combination of Win98SE (apparent showstopper in the 28-7 release) and a pre-SSE AMD Athlon.
MfM: No, I'm not that Dizzy. I did actually pick up my handle in the late 80s in the C64 scene but I wouldn't call myself famous by any means. Also, I mostly coded.
|
|
12.08.2007, 21:35 |
|
[JAZ]
Psycle Developer

Date Registered: 11.2001
Location: Balaguer (Spain)
Posts: 1238
![[JAZ] ist offline](images/offline.gif) |
|
|
Mmm..I can't reproduce it here, but i remember i fixed a problem in the recording, when using 8bits per sample. Could you try with the defaults ( 16bits, 44khz , stereo, and without dither), or confirm that your wav was generated with those?
As a last resort, what happens if you use sublime from psycle 1.8.2?
__________________ <[JAZ]> Pa pi pa pa pa pi pa.... ;·D
|
|
13.08.2007, 11:45 |
|
Dizzy
Psycler

Date Registered: 07.2007
Location:
Posts: 6
 |
|
|
Yes, I did use the defaults except for the fact that dithering was enabled. I think I tried it without dithering as well.
I'm seeing some inconsistent behaviour today (silent wavs for my simple example, but a real song still distorted as before), so I think I'll do some digging on my own and get back with more details later.
Before I start sifting throught the source code, are there any notable differences in how the plug-ins are called in real-time vs. rendering mode?
|
|
13.08.2007, 19:56 |
|
[JAZ]
Psycle Developer

Date Registered: 11.2001
Location: Balaguer (Spain)
Posts: 1238
![[JAZ] ist offline](images/offline.gif) |
|
|
Not really. The only difference is that recording to file is enabled, and that the function is called in a loop, instead of inside the audio thread. Don't know if it could get some parameter erroneously or what.
__________________ <[JAZ]> Pa pi pa pa pa pi pa.... ;·D
|
|
13.08.2007, 21:31 |
|
Dizzy
Psycler

Date Registered: 07.2007
Location:
Posts: 6
 |
|
| |  |
An update on what I've found out so far...
1) I made a proxy dll to log some of the traffic between psycle and sublime (using gcc, which was a bit of a chore). The problem seems to be related to the numsamples variable passed to the Work() method. When playing interactively 128 is mostly used whereas the wav recorder appears to use mostly 256. When the problem is present the 256 case returns only half-filled buffers from sublime.
2) Then I tried changing the sound output setting to Silent, and then it just worked (even if numsamples=256 was used), except that it left out the first 0.5 s or so. Using waveOut caused yet a slightly different behaviour, but did also not work properly.
3) Messing with the sampling frequency in the rendering dialog would just change the pitch (at best) or mess up the whole system (at worst) resulting in a silent system (both rendered and when played in the program).
So not sure what conclusions to draw from that. I haven't verified the correctness of the parameter values that sublime fetches from psycle - that might be one culprit as it seems (at least on the surface) that sublime returns different results depending on the sound output setting.
Any ideas? 
|
|
19.08.2007, 23:54 |
|
Dizzy
Psycler

Date Registered: 07.2007
Location:
Posts: 6
 |
|
|
I think I've pinpointed the problem.
It appears that Sublime can only Work() a certain number of samples at a time once it's initialized. Increasing that number at runtime leads to undefined behaviour.
This happens in my case (dsound output) when recording - it requests 128 samples per call when playing, but starts requesting 256 samples when rendering.
The problem (on the Sublime side) lies at least partly in the m_pamp_level_out buffer which remains stale and starts cutting samples off. There might be other similar problems as well.
On the Psycle side it would probably be safer if the sample-size was kept constant, but I really don't know how easy that is to achieve.
[edit: corrected typo]
Last edited by Dizzy on 22.08.2007, 22:23 o'clock.
|
|
22.08.2007, 22:19 |
|
[JAZ]
Psycle Developer

Date Registered: 11.2001
Location: Balaguer (Spain)
Posts: 1238
![[JAZ] ist offline](images/offline.gif) |
|
|
Thanks for such a detailed report. I sure will take a look.
About constant amount, that's something that might come sometime, but the problem would happen as well with what you say:
Currently, the max size psycle can ask is 256 (that's why rendering uses that). But playing, requires that at line boundaries, ask a determined number of samples, less than that value, and dependant on the bpm, lpb and samplerate.
This second requirement is what could be removed, (not with current player, but with psycle-core/qpsycle's one), but it would still be limited to ask 256 samples.
Anyway.. it is strange that sublime assumes such a thing (numsamples to be constant, or less than asked the first time). It should have assumed the 256 samples mentioned above.
__________________ <[JAZ]> Pa pi pa pa pa pi pa.... ;·D
|
|
22.08.2007, 22:38 |
|
[JAZ]
Psycle Developer

Date Registered: 11.2001
Location: Balaguer (Spain)
Posts: 1238
![[JAZ] ist offline](images/offline.gif) |
|
|
Try this build. I force that it fills all the buffer the first time, so that it cannot happen that it isn't correct.
I've built it without SSE so that you can use it.
http://psycle.sf.net/packages/microsoft/Sublime.zip
__________________ <[JAZ]> Pa pi pa pa pa pi pa.... ;·D
|
|
23.08.2007, 19:54 |
|
|