mirror of
				https://github.com/AquaMorph/Droplets.git
				synced 2025-10-30 16:13:20 +00:00 
			
		
		
		
	Moved outputs size adjustments to droplets
This commit is contained in:
		
							
								
								
									
										7
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								Makefile
									
									
									
									
									
								
							| @@ -1,7 +1,10 @@ | ||||
| TARGET = cascade | ||||
|  | ||||
| CPP_SOURCES = src/main.cpp src/util.cpp src/menu.cpp \ | ||||
|               src/droplets/droplet.cpp src/droplets/noise_droplet.cpp | ||||
| CPP_SOURCES = src/main.cpp \ | ||||
|               src/util.cpp \ | ||||
|               src/menu.cpp \ | ||||
|               src/droplets/droplet.cpp \ | ||||
|               src/droplets/noise_droplet.cpp | ||||
|  | ||||
| LIBDAISY_DIR = ./lib/libDaisy | ||||
| DAISYSP_DIR = ./lib/daisySP | ||||
|   | ||||
| @@ -10,8 +10,10 @@ void Droplet::UpdateState(DropletState m_state) { | ||||
|   screen_min = 0; | ||||
|   screen_max = SSD1309_WIDTH; | ||||
|   if (state == DropletState::kLeft) { | ||||
|     chn_max = 2; | ||||
|     screen_max = SSD1309_WIDTH / 2; | ||||
|   } else if (state == DropletState::kRight) { | ||||
|     chn_min = 2; | ||||
|     screen_min = SSD1309_WIDTH / 2; | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -23,6 +23,8 @@ class Droplet { | ||||
|   const int kTitleHeight = 8; | ||||
|   int screen_min; | ||||
|   int screen_max; | ||||
|   size_t chn_min = 0; | ||||
|   size_t chn_max = 4; | ||||
|   void DrawName(daisy::DaisyPatch*, | ||||
| 		std::string); | ||||
|   void UpdateState(DropletState); | ||||
|   | ||||
| @@ -5,7 +5,6 @@ NoiseDroplet::NoiseDroplet(DaisyPatch* m_patch, | ||||
| 			   DropletState m_state) { | ||||
|   noise.Init(); | ||||
|   filter.Init(); | ||||
|   patch = m_patch; | ||||
|   UpdateState(m_state); | ||||
| } | ||||
|  | ||||
| @@ -14,13 +13,6 @@ void NoiseDroplet::Control() {} | ||||
| void NoiseDroplet::Process(float** in, float** out, size_t size) { | ||||
|   for (size_t i = 0; i < size; i += 2) { | ||||
|     float sig = noise.Process(); | ||||
|     size_t chn_min = 0; | ||||
|     size_t chn_max = 4; | ||||
|     if (state == DropletState::kLeft) { | ||||
|       chn_max = 2; | ||||
|     } else if (state == DropletState::kRight) { | ||||
|       chn_min = 2; | ||||
|     } | ||||
|     for (size_t chn = chn_min; chn < chn_max; chn++) { | ||||
|       out[chn][i] = sig; | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user