architecture arch_midi of sampler is
signal cnt, ncnt : std_logic_vector(9 downto 0);
signal da_strobe_s : std_logic;
signal samp_s : std_logic_vector(15 downto 0);
begin
process(rst, clk)
begin
if rst = '1' then
cnt <= (others => '0');
elsif clk'event and clk = '1' then
cnt <= ncnt;
end if;
end process;
process(cnt)
begin
ncnt <= cnt + 1;
end process;
process(cnt)
begin
if cnt = (others => '1') then
samp_s <= sound_out(23 downto 4);
else
samp_s <= samp_s;
end if;
end process;
da_strobe_s <= '1' when cnt = (others => '1') else '0';
end arch_midi;