DaisySP
Loading...
Searching...
No Matches
Source
Utility
maytrig.h
1
/*
2
Copyright (c) 2020 Electrosmith, Corp, Paul Batchelor
3
4
Use of this source code is governed by an MIT-style
5
license that can be found in the LICENSE file or at
6
https://opensource.org/licenses/MIT.
7
*/
8
9
#pragma once
10
#ifndef DSY_MAYTRIG_H
11
#define DSY_MAYTRIG_H
12
13
#include <stdint.h>
14
#ifdef __cplusplus
15
16
namespace
daisysp
17
{
24
class
Maytrig
25
{
26
public
:
27
Maytrig
() {}
28
~Maytrig
() {}
35
inline
float
Process
(
float
prob)
36
{
37
return
((
float
)rand() / (
float
)RAND_MAX) <= prob ? true :
false
;
38
}
39
40
private
:
41
};
42
}
// namespace daisysp
43
#endif
44
#endif
daisysp::Maytrig
Definition
maytrig.h:25
daisysp::Maytrig::Process
float Process(float prob)
Definition
maytrig.h:35
daisysp
FIR Filter implementation, generic and ARM CMSIS DSP based.
Definition
adenv.h:16
Generated by
1.12.0