Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6193231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:04:59+00:00 2026-05-24T03:04:59+00:00

This question may be very specific, but I’m new to all this and really

  • 0

This question may be very specific, but I’m new to all this and really need some help.

I’m building an iPhone synth app.
I am using DCSliders an DCKnobs (they look nicer than the standard UISliders).

https://github.com/domesticcatsoftware/DCControls#readme

I am also working with libpd (a Pure Data library) so the audio DSP is handled by an embedded Pure Data patch.

https://gitorious.org/pdlib

I have got multiple DCSliders and DCKnobs in my interface. I am able to send control values from the sliders/knobs to Pure Data by making a class the delegate of the DCSlider…

- (void)loadView {
  [super loadView];
  self.mySlider = [[[DCSlider alloc] initWithDelegate:self] autorelease];
  self.mySlider.frame = CGRectMake(10.0, 10.0, 20.0, 120.0);

  [self.view addSubview:self.mySlider];
}

Then I implement a method to send control values to a receiver in Pure Data…

- (void)controlValueDidChange:(float)value sender:(id)sender {  
    [PdBase sendFloat:value toReceiver:@"beatvol"];
}

This all works ok.

The problem is that all of the sliders are sending the same control values.

How do I get each of the DCSliders to send independent control values to different receivers in Pure Data?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T03:04:59+00:00Added an answer on May 24, 2026 at 3:04 am

    You need to assign a tag to your sliders. Then in controlValueDidChange: you need to get that tag and do your actions according to the tags:

    - (void)loadView 
    {
        [super loadView];
        mySlider = [[[DCSlider alloc] initWithDelegate:self] autorelease];
        mySlider.frame = CGRectMake(10.0, 10.0, 20.0, 120.0);
        mySlider.tag = 0;
        [self.view addSubview: mySlider];
    }
    - (void)controlValueDidChange:(float)value sender:(id)sender 
    {  
        DCSlider * slider = (DCSlider *)sender;
    
        switch (slider.tag) 
        {
            case 0: 
            { 
                [PdBase sendFloat:value toReceiver:@"beatvol"];
            }
                break;
            case 1: 
            { 
                /*  do something for the 2nd slider  */;
            }
                break;
        }        
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may be very simple question,But please help me. i wanted to know what
I realize this may be a very simple question but I need to know
This may be a very noobie question, but in today's world of web app
this may be a very simple question, but is it possible to force a
This may be a very mundane question, but this is the first jQuery plugin
This may seem to be an academic question, but still I would be very
This is very similar to a previous question (and may be the exact same
This may seem a very silly question. Consider this: I have a simple Boolean
This question may be too product specifc but I'd like to know if anyone
This question may sound fairly elementary, but this is a debate I had with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.