Comments (3)
Ah, yeah, that's tricky. The trouble is that the Waveform
used by Oscil
is sampled using a 0-1 phase value, so there isn't a reliable moment when the waveform "finishes" playing. The moment where is wraps could happen at any point in the buffer provided to AudioListener
but that information is not really available from there. What I would do in this case is to use multiple Oscil
objects that each reference a different Waveform
. Run them all continuously and when you want to swap to a particular Waveform
fade out the currently audible Oscil
with a Line
patched to its amplitude
property and fade in the Oscil
you want to hear with a different Line
patched to its amplitude
. You could make these fades extremely short so that it sounds more like a swap. If you want to directly update the Waveform
used by a particular Oscil
you could do so while its amplitude
is 0.
from minim.
Thank you, that's a very good idea. However, if I'm correct, for each Oscil I'd need two Lines patched to the same UGenInput (for fading in and out), but that's not possible. Is there something I'm missing?
from minim.
You only need one Line
. When you want to fade out an Oscil
you'd do something like call activate(0.05,1,0)
on the attached Line
and then later when you want to fade that Oscil
back in, you'd call activate(0.05, 0, 1)
on that same Line
.
from minim.
Related Issues (20)
- recorder.save() breaks after 6 files HOT 3
- Any reason to change bufferSize of audioOutput dynamically? HOT 4
- How to normalize input? HOT 1
- getLineIn doesn't work HOT 1
- How to get the artwork of a mp3 file? HOT 1
- Using Minim in processing, how do I get the tempo of an audio file?
- Using minims beatdetect with line in or whatever output sound. HOT 1
- Deleting recorder files on exit HOT 4
- getLineIn() not working on Big Sur with Processing 3 and Minim 2.2.2 HOT 7
- Error when starting some examples HOT 1
- Unable to install minim through processing contribution manager HOT 1
- ClassNotFoundException: ddf.minim.Minim HOT 1
- Way to calculate instantaneous AudioPlayer position? HOT 5
- Support for Processing 4 (getLineIn doesn't work) HOT 4
- The microphone cannot be called in my macbookpro HOT 3
- No Sound Output HOT 4
- recording internal audio HOT 1
- The clock widget is showing the incorrect time when set to the 24-hour clock format. HOT 1
- [Solution] Multiple Audio Devices?! 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 minim.