Comments (5)
ok, i got a little suspicious about the single broken WAV i have in my library, pointed out in the message:
WARNING: File reading failed for path: '/Users/ahihi/SyncBig/sc/dirt/samples/nab/narayanbreikki-129.wav'
i removed it, and sure enough, the code now works as expected... i still don't understand why or how it fails completely on what should be just a warning though. maybe memory corruption?
in case anyone wants to experiment with this, the broken file is available here: https://owo.uwu.fi/narayanbreikki-129.wav
from superdirt.
The error message is really strange indeed, I also don't understand how ~dirt
could become nil as a buffer loading fails.
I wonder if it would be better to really throw errors when something like file reading goes wrong, instead of just warning. @yaxu what do you think?
from superdirt.
i am trying to add some of my own WAV metadata parsing to latest develop
and seeing this weird behavior again - SuperDirt object looks fine inside the function that sets it up, but becomes nil when returned to the caller. im at a complete loss on how to debug this..
from superdirt.
SuperDirt object looks fine inside the function that sets it up, but becomes nil when returned to the caller.
You mean after your set up, ~dirt == nil
?
from superdirt.
yes, very similar situation to the original post. in fact i noticed i had a new invalid wav file in my library and that was again causing the problem.
so i looked into the error handling a bit and after a lot of confusing experimentation i noticed that this line in readWithInfo
probably should be prefixed with a ^
? it seems the intention is to return nil on failure, but the current code returns a Buffer with nil members which has just been free
d. this sus buffer passes the notNil
check and i guess something breaks down the line.
i added that ^
and now the ~dirt
returned by my function looks fine even with the invalid file causing a read fail warning! (i prefer this behavior over throwing)
also, this try
seems wrong (no catch function, try
ed function takes an error arg?) but im not sure whether it affects any of the above.
anyway, yay progress! :) i can test a bit more and make a PR later this week.
from superdirt.
Related Issues (20)
- Release version numbering is inconsistent, breaking automated version checking HOT 4
- how do I "add (something from dirt-hacks) to supercollider startup file"? HOT 11
- SuperDirt WASM?
- `arp` step patterns not working HOT 3
- Start SuperDirt on a server other than default s HOT 1
- module arguments default to 0 instead of default value given in SynthDef HOT 6
- NRPN fails to send value 0 for CC 38
- Q: How do default arguments in the SynthDefs SuperDirt use work? HOT 3
- delay stops working sometimes HOT 4
- amp parameter scaling HOT 3
- playing samples in tune using pitch metadata HOT 2
- unit "s" unexpected behavior HOT 1
- How to add a custom DirtEventType for MIDI over OSC HOT 10
- Supercollider 3.13.0-rc1 / SuperDirt 1.7.3 - High Cpu Usage At Idle - macOS HOT 17
- SuperDirt does not recognize SynthDef variants HOT 2
- superchip is way out of tune HOT 2
- cut groups break on simultaneous events HOT 29
- Should we send RPN Null after NRPN? HOT 4
- d3 onwards not sounding HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from superdirt.