ADSR
Customizable ADSR Controller
Install / Use
/learn @paoloboschini/ADSRREADME
ADSR
Customizable ADSR Controller

Features
- Customizable appearance
- Customizable value range
Basic Usage
See example project for a demo.
// create an ADSR, set custom value range independent from ADSR frame width
ADSR *adsr = [[ADSR alloc] initWithFrame:NSMakeRect(10, 10, 400, 100)
withAttackRange:50
withDecayRange:60
withSustainRange:70
withReleaseRange:80
withColor:[NSColor greenColor]
withBackgroundColor:[NSColor blackColor]];
// Set the ADSR's delegate (must conform to ADSRProtocol and implement four update methods...)
adsr.delegate = self;
// Add ADSR to window
[self.window.contentView addSubview:adsr];
...
// called upon attack update
- (void)attackUpdatedWithValue:(int)value
{
NSLog(@"Attack: %d", value);
}
// called upon decay update
- (void)decayUpdatedWithValue:(int)value
{
NSLog(@"Decay: %d", value);
}
// called upon sustain update
- (void)sustainUpdatedWithValue:(int)value
{
NSLog(@"Sustain: %d", value);
}
// called upon release update
- (void)releaseUpdatedWithValue:(int)value
{
NSLog(@"Release: %d", value);
}
Related Skills
node-connect
352.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
