Comments (4)
implemented in a basic way.
( 14683da )
could be a more elegant queue structure.
from aleph.
reopening this. never had time to do a satisfactory implementation and reverted to direct-set from the spi rx isr (bad). still storing global copy of module parameter data, with dirty flag, which is burning resources but will probably be useful.
aleph/dsp/module.h
aleph/bfin_lib/src/spi.c
from aleph.
not super sure this is related but I'm working on a separate spi event message, the idea is to send just an empty message which calls a module_event(), typically some kind of trigger or next step happening, this part is done. Hoping to add a filter somewhere in the spi process to so that events always are handled before parameter changes.
update with added links to code...
creating an event from an incoming cv trig,
https://github.com/electropourlaction/aleph/blob/dev/apps/prgm/src/handler.c#L32-34
spi transfer, ending with a call to module_set_event()
https://github.com/electropourlaction/aleph/blob/dev/avr32_lib/src/bfin.h#L76
https://github.com/electropourlaction/aleph/blob/dev/avr32_lib/src/bfin.c#L346-351
https://github.com/electropourlaction/aleph/blob/dev/common/protocol.h#L28
https://github.com/electropourlaction/aleph/blob/dev/bfin_lib/src/spi.c#L89-92
https://github.com/electropourlaction/aleph/blob/dev/dsp/module.h#L58
stuff happens, module specific implementation,
https://github.com/electropourlaction/aleph/blob/dev/modules/prgm/prgm.c#L401-418
from aleph.
i'm referring to a broader change in the architecture wherein control changes would be processed at a fixed rate on the blackfin, slower than the audio rate, instead of directly from the SPI RX interrupt.
our current strategy is to use the bfin_ready GPIO to hold off sending from the avr32 until bfin is not currently processing an audio frame, and assuming that this means it has time to process an SPI transaction before the next audio frame. seems to work pretty well...
but i'm working on restructuring the whole mess to something like this:
- maintain an 8- or 16-frame sample buffer for audio I/O
- read and write to this buffer on audio ISR
- main loop processes the whole buffer (instead of a single frame)
a complementary step would be to maintain a similar buffer for control changes, push param changes / events in SPI ISR, and process them in main loop once per audio block.
from aleph.
Related Issues (20)
- Build aleph-serial -> OSC bridge in pure C HOT 12
- SVF topology review HOT 13
- net_midi/net_hid linked list implementation bug? HOT 9
- Make BEES serial protocol less crash-prone
- PD op emulator & patch editor
- Improve BEES' Output Split Feature HOT 1
- Create BEES MAGINC operator
- Make monome grid come up cleanly on boot HOT 2
- Create Param Scaler for Text Labels HOT 2
- BEES pages UI enhancements
- using bfin for graphics HOT 3
- Cheap MIDI interface fails with MIDINOTE operator HOT 24
- optimization flags HOT 3
- CV output glitches HOT 10
- lines unused slew params & 'stuck states' HOT 2
- globalTimescale seems to be getting intermittently banged with random numbers HOT 9
- Release 0.8.0 firmware (modules & BEES)
- lines write head clicks & pops
- SD card formatting details HOT 2
- Lines module crashes when loop < delay
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 aleph.