• Welcome to Jose's Read Only Forum 2023.
 

Recent posts

#91
microA Interpreter / Re: microA interpreter
Last post by Zlatko Vid - February 04, 2023, 02:18:05 PM
testing  ;D
#92
OxygenBasic Examples / Re: Playing with the Beep func...
Last post by Charles Pegge - February 02, 2023, 06:32:03 PM
Playing various MIDI parameters - including timing, pitch, volume, pan, and pitch bending and modulation. I'm using raw short messages compacted with macros. The hex bytes of each message are read from right to left, so the midi command nybble and channel nybble are on the right.


  uses minwin
  uses minmidi

  def MM midiOutShortMsg hMidi, 0X%1
  def MT sleep

  sys hMidi
  int er=midiOutOpen(hMidi, 0, 0, 0, CALLBACK_NULL) ' 0=synth a 2=soft synth
  MM 0xff     'reset
  MM 0x79B0   'reset all controllers

  'MM 0000C0 'PIANO
  MM 000EC0 'PROG TUBULAR BELLS
  int i
  for i=1 to 3
    MM 3007B0 'VOL
    MM 7F0AB0 'PAN
    MM 404590 'A4 ON
    MT 300
  next
  for i=1 to 3
    MM 3007B0 'VOL
    MM 000AB0 'PAN
    'MM 4001B0 'MODULATION WHEEL
    MM 4C80E0 'PITCH WHEEL
    MM 404590 'A4 ON
    MT 300
  next
  for i=1 to 3
    MM 3007B0 'VOL
    MM 000AB0 'PAN
    MM 4001B0 'MODULATION WHEEL
    MM 4080E0 'PITCH WHEEL
    MM 304590 'A4 ON
    MT 300
  next
int j=45 'A2
  for i=1 to 12
    MM 3007B0 'VOL
    MM 400AB0 'PAN
    MM 0001B0 'MODULATION WHEEL
    MM 4080E0 'PITCH WHEEL
    MM 250090+j*0x100 'SCALING NOTE ON
    MT 200
    j+=3
  next
  MT 3000
  MM 004580 'A4 OFF


  midiOutClose(hMidi)
#93
OxygenBasic / Kick - o2 precompiler
Last post by Pierre Bellisle - February 02, 2023, 08:18:12 AM
If anybody is interested in a precompiler utility, here is Kick.
It serve as an interface between an editor and co2.exe.
Editor that have a jump to line / column option when a coding error is detected are: UltraEdit, PsPad, and NotePad++.
Some may be added in the future if any request.
Kick offer multiples possibilities, from Kick.zip, read KickHelp.rtf

Kick.zip MD-5 checksum: C32A532BE74EFD24D14917A448E5F423

About KicK precompiler  by Pierre Bellisle.

Kick.exe is a precompiler program that stand between a code editor like UltraEdit or NotePad++ and Charles Pegge's Oxygen o2 Just-in-time compiler. The editor call Kick with a command line, and Kick call the compiler with an often reworked command line.
Kick is aware of the GoRC resource compiler and can call it to create a .res from a .rc.
Kick get most of is directives from the main .o2bas file wich is convenient.
It will propose to end active exe that stop the compiler to create new .exe/.dll. It will do a sound or shake the Editor window to confirm that a compilation was successful if no run command is given, this is less intrusive than a MessageBox. You may disable sound and shake by editing Kick.ini and set SoundEnable and/or ShakeEnable to zero.
You may also disable the splashscreen by editing Kick.ini and set the milisecond SplashTime to 0.
Source .o2bas files may be ANSI Code Page, UTF8, UTF16LittleEndian.
Kick.exe might be compress with Markus Oberhumer, Laszlo Molnar & John Reiser UPX.

Directive from the editor:
Usually the easiest way is to have the editor give the .o2bas or .bi, or .rc filename none or a few switch.
For example the "Compile32" command line from the editor: -32 "D:\O2\SomeCode.o2bas"
All fileNames must be between double-quotes. Full path is strongly suggested. Switches may be anywhere and space are optionnal.

Switches are:
-mem32 (-m) {Run in memory as 32bit, no switch at all give same result}
-32    (-3) {Compile 32 bit to file}
-64    (-6) {Compile 64 bit to file}
-run   (-r) {Run compiled exe}
-dll   (-d) {Compile a DLL}
(-a, -b, -c, and -i are ignored, original -m is managed by Kick)
Switches are not case sensitive.

FileNames:
.o2bas, .bi, .rc .inc {Main full filename to work on, or secondary if (KickUseDirectivesFrom) redirection is used}
.exe                  {Optional alternative exe full filename}
.res                  {Optional .res resource file}
If full filename are not given, Kick may complete with the informations it have)

Redirection:
The Kick directives are usually in the main .o2bas file. You may use (KickUseDirectivesFrom) redirection in many case. The advantage is that you do not have to switch the Editor from file to file to compile your project.
Example, in a .rc or .inc or .bi you could have the line: // KickUseDirectivesFrom "D:\O2\SomeCode.o2bas". This will cause Kick to stop reading this file and read SomeCode.o2bas for compilation directives. This way you concentrate on coding, not switching files in the Editor.

Redirections may be up to 15 level, Example:
SomeCode15.o2bas redirect to SomeCode14.o2bas, (// KickUseDirectivesFrom "D:\o2\SomeCode14.o2bas" // Optional comment)
SomeCode14.o2bas redirect to SomeCode13.o2bas, (// KickUseDirectivesFrom "D:\o2\SomeCode13.o2bas" // Optional comment)
...
SomeCode02.o2bas redirect to SomeCode01.o2bas, (// KickUseDirectivesFrom "D:\o2\SomeCode01.o2bas" // Optional comment)

Directives:
The directives start with double-slash and have the "Kick" prefix.
You may add comments after a second double-slash on the same line.

Kick directives examples:
// KickCompiler "D:\o2Old\co2.exe" // Use another Compiler/Folder, like for another o2 version
// KickResource "SomeFile.res" // Integrate this resource file in compilation
// KickExeFileName "SomeCodeToTry.exe" // Optional exe/dll FileName
// KickSwitch -mem32 -32 -64 -run -dll  // See switch above (No switch mean -mem32)
// KickExeArgument "SomeArgCommandLine" // Command line to give to starting .exe
// KickLog // Log from Kick.exe for debug purpose
// KickHelp // Show this help
// KickOxyLog // Show Oxy text log
// KickUseDirectivesFrom "D:\Dev\o2\SomeOtherFile.o2bas" // Tell Kick to use directives from another file.
// KickEnd // To save time, Kick will not search Kick info passed this point
   .rc file only support KickUseDirectivesFrom and KickEnd.

.rc and .res compilation
If you compile a .rc, result will be .res file.
If you compile a .o2bas with an .res in // KickResource, then the exe will be compiled including the .res
If you compile a .o2bas with an .rc in // KickResource, the .res file will be compiled, and then the exe will be compiled including the .res.

Bitness feature:
If Pause key is down or Scroll-Lock is on when calling Kick, then the bitness of the exe/dll will be changed.
Aka: if a -32 swicth is found, 64bit will be used and vice-versa
This feature may be removed in the future.

O2 compiler directive:
Kick will respect the next directives
$ dll               
$ FileName "D:\o2\SomeCode.exe" 
#file "D:\o2\SomeCode.exe"
include "RTL32.inc"
include "RTL64.inc"

TextViewer.exe is used to show log and this help, it should be kept in the Kick folder.

Special keys
From your IDE, if you hold the PAUSE or the Left-WINDOW key down
while clicking your compile or compile/run button then the bitness will be flipped,
meaning, 32 bit option will become 64 and vice-versa.
Same effect if SCROLL-LOCK is on.
SHIFT key down force a run in memory 32

Splash screen
You may right click on the splash screen to keep it running or left click to end it.
To change the timeout, edit the Kick.ini [Properties] miliseconds SplashTime field.
Zero (0) mean no splash screen, maximum value is 10,000  for 10 seconds.

Freeze
You may put a shortcut to Kick.exe on the desktop.
In certain case, if Kick freeze the editor, then starting it again it will try to auto terminate.
--------------------------------------------
#94
General Discussion / Re: Say GOODBYE to those who g...
Last post by José Roca - February 01, 2023, 05:50:40 PM
You try to scare us with all possible evils which, of course, do not come true.

Do you know anyone personally who has contracted AIDS, blindness, etc. because of vaccines?

And now you come to me with UFOs. What's next? That it is a plan of the aliens to wipe out humanity?
#95
OxygenBasic Examples / Re: Playing with the Beep func...
Last post by Charles Pegge - February 01, 2023, 01:51:19 PM
Hi Roland,

midi note 127 is G9, 2 notes short of A9, which would be 440*pow(2,5) = 14080Hz. This is well above most adults hearing ability. But the Midi instruments have lower harmonics, so the notes still remain audible. Pure sine waves, free of any distortion are required.

Anyway, I just wanted to warn you about a sync problem in my AudioSynth/waves.inc. This becomes apparent when feeding the waveform for individual notes into the audio buffer. I did not have this problem with my Vista PC but you will hear it in demos 1..6. The buffer seems to be read faster than real-time in these demos.


  midi octave 4
  A4=440Hz
  C4 = 220*pow(2,3/12) = 440*pow(2,-9/12) 'middle C 261.63Hz

MIDI NOTE NUMBERS
---------------------------------------------------------------
    C   C#  D   D#  E   F   F#  G   G#  A   A#  B   with sharps
    C   Db  D   Eb  E   F   Gb  G   Ab  A   Bb  B   with flats
---------------------------------------------------------------
oct                                                  A-frequ
-1  00  01  02  03  04  05  06  07  08  09  10  11    13.75
0   12  13  14  15  16  17  18  19  20  21  22  23    27.5
1   24  25  26  27  28  29  30  31  32  33  34  35    55
2   36  37  38  39  40  41  42  43  44  45  46  47    110
3   48  49  50  51  52  53  54  55  56  57  58  59    220
4   60  61  62  63  64  65  66  67  68  69  70  71    440
5   72  73  74  75  76  77  78  79  80  81  82  83    880
6   84  85  86  87  88  89  90  91  92  93  94  95    1760
7   96  97  98  99  100 101 102 103 104 105 106 107   3520
8   108 109 110 111 112 113 114 115 116 117 118 119   7040
9   120 121 122 123 124 125 126 127                   14080
---------------------------------------------------------------
#96
General Discussion / Re: Say GOODBYE to those who g...
Last post by Theo Gottwald - February 01, 2023, 12:08:34 PM
Jose, you are GENIUS in Programming, - anybody here knows.
If we look at medical knowledge and Insight Knowledge whats behind the "News in the Media" this is not your strong side. You tend to just believe it because its in the news.

Its just that any person has strong sides and weak sides.
Most people do not know everything, but Jesus.

So what we did, we found someone who is the perfect programmer -thats you.
You made significant code for the PB Community.

Yet we do not really believe in that you also know insights about chemistry, politics or ....UFOs.
Doesn't mean they do not exist. It does not change your value in any way.
This is not a political forum, we just discuss that stuff "Sort of Jokes".

German UFOs

Mysteries of the Untersberg

We have to accept thing we can understand some things and things we can just believe.
If I see your programs, i can just believe ... i don't understand most of them.
But I know that.

About the completely useless "Fake-vaccination", i just hope that you and those who used it can stay healthy.
For many of these people - and we have currently reached a over-death rate of 45% - its too late.
They will take a look on this - coming war - from heaven.

;D


#97
OxygenBasic Examples / Re: Playing with the Beep func...
Last post by Roland Stowasser - February 01, 2023, 09:36:39 AM
Hi Charles,

probably the formula for f in MinMidi.inc is not qute complete? I found this formula for connecting the MIDI note number and the base frequency - assuming equal tuning based on A4=a'=440:

f=pow(2,(d-69)/12)*440

It is possible to play the midi notes up to No. 127, allowing further study with midi. Unfortunately, the upper range up to 20,000 Hz cannot be reached with this method. So I will study the demos in the AudioSynth folder again. The solution is probably there.


$ filename "PlayMidiNotes.exe"

'uses rtl32
'uses rtl64

uses console

'uses minmidi
'octave 0..10
extern lib "Winmm.dll"

sys midiOutOpen(sys *phmo, uDeviceID,dwCallback, dwInstance,fdwOpen)
sys midiOutShortMsg(sys hmo, dwMsg)
sys midiOutClose(sys hmo)
sys midiOutReset(sys hmo)

% MIDIMAPPER = 0xFFFFFFFF
% MIDI_MAPPER = 0xFFFFFFFF
% CALLBACK_NULL = 0
% MMSYSERR_NOERROR = 0

function freq(int d) as double
   return pow(2,(d-69)/12)*440
end function

function playNotes() as uint
   int err
   sys hMidiOut   
   uint PPQN_CLOCK = 5

   err = midiOutOpen(hMidiOut, MIDIMAPPER, 0, 0, CALLBACK_NULL)
   if (err != MMSYSERR_NOERROR) then
      printl "Error opening MIDI Mapper, Error code: " err
   end if

   int Instrument = 72  'Piccolo, 0x48
   err = midiOutShortMsg(hMidiOut, (0x100 * Instrument) + 0xc0)
   'err = midiOutShortMsg(hMidiOut, 0x48c0)

   dword noteOn
   dword noteOff
   int i = 20

   printl "Midi"
   printl "Num   NoteOn      NoteOff" 
   while i < 127   
       i+=1 : print i ") "       
       
       '         velocity           midi num     cmd: on
       noteOn = (0x7f * 0x10000) + (i * 0x100) + 0x90 : print "0x00" hex (noteOn) ", "
       
       err = midiOutShortMsg(hMidiOut, noteOn)
       if(err != MMSYSERR_NOERROR) then
          printl "Error sending command, Error code: " err
       end if   
       
       noteOff = (i * 0x100) + 0x80 : print "0x0000" hex(noteOff) ", "
       print " Hertz: " str(freq(i),2) + cr
       Sleep(100 * PPQN_CLOCK)

       err = midiOutShortMsg(hMidiOut, noteOff)
       if(err != MMSYSERR_NOERROR) then
          printl "Error sending command, Error code: " err
       end if         
   wend

   midiOutReset(hMidiOut)
   midiOutClose(hMidiOut)
   return 0
end function

playNotes()

printl "Enter ..."
waitkey
#98
General Discussion / Re: Say GOODBYE to those who g...
Last post by José Roca - January 31, 2023, 02:38:46 AM
Death from cardiac arrest among athletes is not uncommon.

Some professional football players who died of cardiac arrest before Covid:

Davide Astori
Dani Jarque
Marc-Vivien Foé
Miklós Fehér
Antonio Puerta
Seginho

No Surge in Athlete Deaths, Contrary to Widespread Anti-Vaccine Claims

https://www.factcheck.org/2023/01/scicheck-no-surge-in-athlete-deaths-contrary-to-widespread-anti-vaccine-claims/


#99
General Discussion / Re: Say GOODBYE to those who g...
Last post by Charles Pegge - January 30, 2023, 02:03:57 PM
Thanks José.

A good source of intelligent critique, though not an easy read. I think the gist of the criticisms are 'comparing 'apples with oranges' and making misleading inferences. However, I feel that Dr Campbell is broadly correct and would like to see more counter-arguments.

But Dr Campbell is not the only one opposing these spike-protein mRNA vaccines. I reproduce this link from the mRNA thread - raising concerns at the clinical level:

UK Doctors Call For Government Investigation of mRNA COVID Vaccines
Christopher Norris
Jan 13, 2023
https://www.youtube.com/watch?v=_nIMhKA8jFY

Also:

Recent Cardiac Events Amongst Sports People
https://projectavalon.net/forum4/showthread.php?116806-Recent-Cardiac-Events-Amongst-Sports-People
Nov 2021 ...
#100
General Discussion / Re: Say GOODBYE to those who g...
Last post by José Roca - January 30, 2023, 04:23:20 AM
Reviews of articles by: John Campbell
https://healthfeedback.org/authors/john-campbell/